:root {
    --primary: #7323a9;
    --primary-dark: #5a1b85;
    --primary-light: #8a3bc4;
    --secondary: #fd18f0;
    --gradient: linear-gradient(135deg, #7323a9, #fd18f0);
    --gradient-hover: linear-gradient(135deg, #8a3bc4, #fd18f0);

    --text-dark: #1a1a1a;
    --text-muted: #6c757d;
    --text-light: #999;

    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;

    --success: #25D366;
    --error: #dc3545;
    --warning: #ffc107;

    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-primary: 0 10px 30px rgba(115, 35, 169, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --transition: all 0.3s ease;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input {
    font-family: inherit;
    outline: none;
}

/* --------------------------------------------------------------------------
   Login Page
   -------------------------------------------------------------------------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f3f7 0%, #ffffff 50%, #f8f5fa 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Shapes */
.login-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
}

.bg-shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(115, 35, 169, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 15s ease-in-out infinite;
}

.bg-shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(253, 24, 240, 0.06) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: float 12s ease-in-out infinite reverse;
}

.bg-shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(115, 35, 169, 0.05) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -30px) scale(1.05);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.3;
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

/* Login Card */
.login-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(115, 35, 169, 0.08);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

/* Logo */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    width: 100px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--gradient);
    border-radius: 16px;
    box-shadow: var(--shadow-primary);
}

.logo-icon i {
    font-size: 28px;
    color: white;
}

.logo-text {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-header p {
    font-size: 15px;
    color: var(--text-muted);
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group label i {
    color: var(--primary);
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    color: var(--text-dark);
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-control:focus {
    background: var(--bg-white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(115, 35, 169, 0.1);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: var(--text-muted);
    font-size: 18px;
    padding: 4px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    padding-left: 28px;
}

.remember-me input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
}

.remember-me:hover .checkmark {
    border-color: var(--primary);
}

.remember-me input:checked~.checkmark {
    background: var(--gradient);
    border-color: var(--primary);
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me input:checked~.checkmark::after {
    display: block;
}

.forgot-password {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}

.forgot-password:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--gradient);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.btn-login:hover:not(:disabled) {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(115, 35, 169, 0.4);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
}

.btn-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    margin: 28px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Register Section */
.login-register {
    text-align: center;
}

.login-register p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.btn-register {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-register:hover {
    background: var(--gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-register i {
    transition: transform 0.3s ease;
}

.btn-register:hover i {
    transform: translateX(4px);
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
}

.login-footer p {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 13px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-links .separator {
    color: var(--border-color);
}

/* --------------------------------------------------------------------------
   Responsive - Login
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .login-page {
        padding: 16px;
    }

    .login-card {
        padding: 36px 24px;
        border-radius: var(--radius-lg);
    }

    .logo-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .logo-icon i {
        font-size: 24px;
    }

    .logo-text {
        font-size: 28px;
    }

    .login-header h1 {
        font-size: 22px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .btn-login {
        padding: 14px 20px;
        font-size: 15px;
    }

    .btn-register {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Dashboard / Panel Base Styles (for future use)
   -------------------------------------------------------------------------- */

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.sidebar-link:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(115, 35, 169, 0.1), rgba(253, 24, 240, 0.1));
    color: var(--primary);
}

.sidebar-link i {
    font-size: 20px;
    width: 24px;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 24px;
    min-height: 100vh;
    background: var(--bg-light);
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Stats Card */
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(115, 35, 169, 0.1), rgba(253, 24, 240, 0.1));
    border-radius: var(--radius-md);
    color: var(--primary);
    font-size: 24px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-info p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(115, 35, 169, 0.4);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--gradient);
    border-color: transparent;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-light);
}

.table td {
    font-size: 14px;
    color: var(--text-dark);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.badge-success {
    background: rgba(37, 211, 102, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #d69e00;
}

.badge-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error);
}

.badge-primary {
    background: linear-gradient(135deg, rgba(115, 35, 169, 0.1), rgba(253, 24, 240, 0.1));
    color: var(--primary);
}

/* Avatar */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 18px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

/* Responsive - Dashboard */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }

    .top-bar {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}