/**
 * Mailketing - Modern Dashboard Style
 * Main CSS - Design System
 * Brand Colors: #007bff (primary), #FFCC00 (secondary)
 */

/* ============================================================================
   RESET & BASE
   ============================================================================ */

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

/* ============================================================================
   CSS VARIABLES - Design System
   ============================================================================ */

:root {
    /* Brand Colors */
    --primary-color: #007bff;
    --secondary-color: #FFCC00;
    --gradient-start: #007bff;
    --gradient-end: #0056b3;

    /* Status Colors */
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    /* Text Colors */
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #64748b;
    --text-lighter: #94a3b8;

    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-lighter: #f1f5f9;

    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 123, 255, 0.15);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* ============================================================================
   LAYOUT - Auth Pages
   ============================================================================ */

.auth-layout {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.auth-layout::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 123, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 204, 0, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(102, 126, 234, 0.3) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ============================================================================
   FLOATING SHAPES
   ============================================================================ */

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary-color);
    bottom: 20%;
    right: 15%;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--primary-color);
    top: 60%;
    left: 70%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(30px, -30px) rotate(90deg); }
    50% { transform: translate(-20px, 20px) rotate(180deg); }
    75% { transform: translate(40px, 10px) rotate(270deg); }
}

/* ============================================================================
   CONTAINER & CARDS
   ============================================================================ */

.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    animation: slideIn 0.6s ease-out;
}

.container-wide {
    max-width: 600px;
}

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

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl) 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
}

/* ============================================================================
   LOGO & BRANDING
   ============================================================================ */

.logo-container {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.logo-container img {
    height: 50px;
    margin-bottom: var(--space-md);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform var(--transition-base);
}

.logo-container img:hover {
    transform: scale(1.05);
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.5px;
    text-align: center;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-light);
    font-weight: 500;
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* ============================================================================
   ALERTS
   ============================================================================ */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: alertSlide 0.4s ease-out;
}

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

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.alert-icon {
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.2px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    transition: all var(--transition-base);
    background: var(--bg-white);
    font-family: inherit;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

.form-input:disabled,
.form-select:disabled {
    background: var(--bg-lighter);
    cursor: not-allowed;
    opacity: 0.6;
}

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

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color var(--transition-base);
}

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

/* Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: var(--space-lg) 0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-wrapper label {
    font-size: 14px;
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

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

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.5);
}

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

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-dark);
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Loading State */
.btn-loading {
    color: transparent;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ============================================================================
   TABS
   ============================================================================ */

.tab-container {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    background: var(--bg-light);
    padding: 6px;
    border-radius: var(--radius-md);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
}

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

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* ============================================================================
   LINKS & TEXT ELEMENTS
   ============================================================================ */

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

a:hover {
    color: var(--gradient-end);
}

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

.text-muted {
    color: var(--text-light);
}

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

.info-box {
    text-align: center;
    margin-top: var(--space-lg);
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(255, 204, 0, 0.05) 100%);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 123, 255, 0.1);
}

.info-box-text {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: var(--space-sm);
}

.info-box-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all var(--transition-base);
    display: inline-block;
}

.info-box-link:hover {
    color: var(--gradient-end);
    transform: scale(1.05);
}

/* ============================================================================
   BADGES
   ============================================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-info {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--success-color);
    font-weight: 600;
}

.security-icon {
    font-size: 16px;
}

/* ============================================================================
   CONFIRMATION PAGE
   ============================================================================ */

.confirmation-page {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 40px 10px 60px;
}

.confirmation-card {
    width: 100%;
    max-width: 760px;
    padding: 48px 40px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 255, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 24px 60px rgba(0, 123, 255, 0.18);
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
    animation: confirmationFloat 0.6s ease forwards;
}

.confirmation-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(0, 123, 255, 0.08), transparent 55%);
    pointer-events: none;
}

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

.confirmation-header {
    text-align: center;
    margin-bottom: 32px;
}

.confirmation-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: rgba(0, 123, 255, 0.12);
    color: #0056b3;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.confirmation-title {
    margin-top: 20px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.confirmation-subtitle {
    margin-top: 12px;
    color: var(--text-light);
    font-size: 16px;
}

.confirmation-content {
    margin-top: 24px;
    padding: 24px 28px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    color: var(--text-medium);
    font-size: 16px;
    line-height: 1.7;
}

.confirmation-content h1,
.confirmation-content h2,
.confirmation-content h3 {
    margin-top: 20px;
    color: var(--text-dark);
}

.confirmation-content p {
    margin: 10px 0;
}

.confirmation-actions {
    margin-top: 36px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.confirmation-actions .btn {
    width: auto;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-gradient {
    background: linear-gradient(135deg, #007bff, #4899ff);
    color: #fff;
    box-shadow: 0 12px 25px rgba(0, 123, 255, 0.25);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(0, 123, 255, 0.3);
}

.btn-link {
    background: rgba(0, 123, 255, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #0f4fbf;
}

.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px rgba(15, 79, 191, 0.15);
}

.btn-icon {
    font-size: 16px;
}

.confirmation-default-message {
    text-align: center;
}

.confirmation-default-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #36a2ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 36px;
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.confirmation-default-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.confirmation-default-text {
    margin-top: 12px;
    color: var(--text-medium);
    font-size: 16px;
}

/* ============================================================================
   SUCCESS ICONS
   ============================================================================ */

.success-icon {
    text-align: center;
    font-size: 64px;
    margin-bottom: var(--space-lg);
    animation: bounceIn 0.8s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

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

@media (max-width: 992px) {
    .confirmation-card {
        padding: 40px 28px;
    }
}

@media (max-width: 768px) {
    .auth-layout {
        padding: 12px;
    }

    .card {
        padding: 36px 28px;
    }

    .page-title {
        font-size: 24px;
    }

    .container {
        max-width: 100%;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .confirmation-card {
        padding: 32px 24px;
    }

    .confirmation-title {
        font-size: 26px;
    }

    .confirmation-subtitle {
        font-size: 15px;
    }

    .confirmation-content {
        padding: 20px 22px;
        font-size: 15px;
    }

    .confirmation-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

    .confirmation-default-icon {
        width: 70px;
        height: 70px;
        font-size: 30px;
    }

    .confirmation-default-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 24px 20px;
    }

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

    .form-input,
    .form-select {
        padding: 12px 14px;
        font-size: 14px;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .auth-layout {
        background: white;
    }

    .shape,
    .btn,
    .security-badge {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
