/* ============================================
   SARP - Professional UI Design
   Modern, clean authentication portal
   ============================================ */

:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #4D94FF;
    --secondary: #00C7BE;
    --background: #0A1628;
    --background-light: #152238;
    --surface: #FFFFFF;
    --surface-secondary: #F8FAFC;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --border: #E2E8F0;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #0F1F3D 50%, var(--background-light) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LOGIN PAGE LAYOUT
   ============================================ */

.login-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.login-left {
    flex: 1;
    padding: 3rem;
    color: white;
    max-width: 500px;
    z-index: 1;
}

.login-left h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.login-left .subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--secondary);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.login-left p {
    line-height: 1.8;
    opacity: 0.9;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 480px;
    backdrop-filter: blur(10px);
}

.login-card h2 {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.login-card .subtitle-text {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

/* ============================================
   AUTH METHOD TABS
   ============================================ */

.auth-methods {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--surface-secondary);
    padding: 0.375rem;
    border-radius: var(--radius-md);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ============================================
   FORM STYLES
   ============================================ */

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--surface);
    color: var(--text-primary);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

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

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: var(--border);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--surface-secondary);
    color: var(--text-primary);
    box-shadow: none;
}

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

.btn-small {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    width: auto;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #DC2626 100%);
}

/* ============================================
   MESSAGES & ALERTS
   ============================================ */

.error-message {
    background: #FEF2F2;
    color: var(--error);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border-left: 4px solid var(--error);
    animation: slideIn 0.3s ease-out;
}

.success-message {
    background: #F0FDF4;
    color: var(--success);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border-left: 4px solid var(--success);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.otp-display {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border: 1.5px solid var(--warning);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    text-align: center;
}

.otp-display p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.otp-display strong {
    font-size: 2rem;
    color: var(--warning);
    letter-spacing: 0.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* ============================================
   INFO BOXES
   ============================================ */

.info-box {
    margin-top: 2rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.info-box strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.info-box ul {
    margin: 0.75rem 0 0 1.5rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.info-box p {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

/* ============================================
   ACCOUNT PAGE
   ============================================ */

.account-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
}

.account-header {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-secondary) 100%);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.account-header h1 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.account-header p {
    color: var(--text-secondary);
}

.account-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.account-section h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.benefit-box {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
    border-left: 4px solid var(--success);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
}

.benefit-box strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}

/* ============================================
   CONTACT LIST
   ============================================ */

.contact-list {
    list-style: none;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    background: var(--surface);
}

.contact-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.contact-item .contact-value {
    font-weight: 600;
    color: var(--text-primary);
}

.contact-item .contact-badge {
    background: var(--primary);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.add-contact-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   MEDIAZONE PAGE
   ============================================ */

.mediazone-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
}

.mediazone-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.mediazone-header h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.mediazone-content {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.mediazone-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.mediazone-screenshot {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
}

/* ============================================
   ADMIN PAGE
   ============================================ */

.admin-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 2rem;
}

.admin-header {
    background: linear-gradient(135deg, var(--background) 0%, var(--background-light) 100%);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-xl);
    color: white;
}

.admin-header h1 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.admin-header p {
    color: rgba(255, 255, 255, 0.8);
}

.admin-table-container {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow-x: auto;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td {
    padding: 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--surface-secondary);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

th:first-child {
    border-top-left-radius: var(--radius-md);
}

th:last-child {
    border-top-right-radius: var(--radius-md);
}

tr:hover {
    background: var(--surface-secondary);
}

tr:last-child td {
    border-bottom: none;
}

.contact-tag {
    display: inline-block;
    background: var(--surface-secondary);
    color: var(--text-primary);
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    margin-right: 0.5rem;
    margin-bottom: 0.375rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 968px) {
    .login-container {
        flex-direction: column;
    }

    .login-left, .login-right {
        max-width: 100%;
    }

    .login-left h1 {
        font-size: 2.5rem;
    }

    .login-card {
        padding: 2rem;
    }

    .auth-methods {
        flex-direction: column;
    }

    .auth-tab {
        border-left: 3px solid transparent;
        border-bottom: none;
        text-align: left;
    }

    .auth-tab.active {
        border-left-color: var(--primary);
    }
}

@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
    }

    .login-card {
        padding: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ============================================
   LOADING & ANIMATIONS
   ============================================ */

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   HELP ICON
   ============================================ */

.help-icon {
    color: var(--primary);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.help-icon:hover {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.help-icon svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.gap-2 {
    gap: 2rem;
}
