/* ================================
   YA MISMO LLEGO - ADMIN PANEL
   Diseño Corporativo
================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ff3d5a 0%, #ff1744 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(255, 29, 68, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 213, 220, 0.3);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1 {
    color: #222;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.header-logo {
    height: 48px;
    width: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #666;
    font-weight: 500;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px 48px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
    width: 100%;
    max-width: 420px;
}

.login-logo {
    display: block;
    height: 60px;
    width: auto;
    margin: 0 auto 24px;
}

.login-box h2 {
    color: #222;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 22px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: #333;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: #f6f7fb;
    border-radius: 999px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: #eef0f7;
}

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

.password-input-wrapper input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #ff3d5a;
}

.toggle-password:focus {
    outline: none;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #ff3d5a 0%, #ff1744 100%);
    color: white;
    width: 100%;
    margin-top: 16px;
    padding: 12px 0;
    box-shadow: 0 8px 16px rgba(255, 52, 85, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff5272 0%, #ff2d5a 100%);
    box-shadow: 0 12px 22px rgba(255, 52, 85, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #333;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 10px 20px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 20px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 10px 20px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Dashboard */
.dashboard {
    background: white;
    padding: 35px;
    border-radius: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.hidden {
    display: none !important;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ec 100%);
    padding: 28px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 213, 220, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 61, 90, 0.15);
}

.stat-icon {
    font-size: 40px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.stat-icon.pending {
    background: #fef3c7;
    color: #92400e;
}

.stat-icon.approved {
    background: #d1fae5;
    color: #065f46;
}

.stat-icon.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.stat-icon.suspended {
    background: #fed7aa;
    color: #9a3412;
}

.stat-icon.total {
    background: #fce7f3;
    color: #9f1239;
}

/* SVG Icons in Buttons */
.btn-icon, .nav-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

.nav-btn, .filter-btn, .profile-type-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stat-info h3 {
    font-size: 34px;
    color: #e5233e;
    margin-bottom: 5px;
    font-weight: 700;
}

.stat-info p {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Profile Type Selector */
.profile-type-selector {
    margin-bottom: 25px;
}

.profile-type-selector h3 {
    color: #222;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 700;
}

.profile-type-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.profile-type-btn {
    padding: 14px 28px;
    border: 2px solid #f0f0f0;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.profile-type-btn:hover {
    border-color: #ff3d5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 61, 90, 0.2);
}

.profile-type-btn.active {
    background: linear-gradient(135deg, #ff3d5a 0%, #ff1744 100%);
    color: white;
    border-color: #ff3d5a;
    box-shadow: 0 4px 12px rgba(255, 29, 68, 0.3);
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    border: 2px solid #f0f0f0;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.filter-btn:hover {
    border-color: #ff3d5a;
    color: #ff3d5a;
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff3d5a 0%, #ff1744 100%);
    color: white;
    border-color: #ff3d5a;
    box-shadow: 0 2px 8px rgba(255, 29, 68, 0.2);
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 20px;
}

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

.users-table thead {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ec 100%);
}

.users-table th {
    padding: 18px;
    text-align: left;
    color: #e5233e;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    border-bottom: 2px solid #ffd5dc;
}

.users-table td {
    padding: 18px;
    border-bottom: 1px solid #f9fafb;
    color: #333;
    font-weight: 500;
}

.users-table tbody tr {
    transition: background 0.2s ease;
}

.users-table tbody tr:hover {
    background: #fff5f7;
}

.loading-row td {
    text-align: center;
    color: #999;
    padding: 40px;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.approved {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.suspended {
    background: #e0e7ff;
    color: #3730a3;
}

/* Type Badge */
.type-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.type-badge.users {
    background: #e0e7ff;
    color: #3730a3;
}

.type-badge.drivers {
    background: #dbeafe;
    color: #1e40af;
}

.type-badge.businesses {
    background: #fce7f3;
    color: #9f1239;
}

/* Legacy support */
.type-badge.driver {
    background: #dbeafe;
    color: #1e40af;
}

.type-badge.business {
    background: #fce7f3;
    color: #9f1239;
}

.type-badge.standard {
    background: #e0e7ff;
    color: #3730a3;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Error Message */
.error-message {
    color: #ef4444;
    font-size: 13px;
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 30px;
    max-width: 700px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 2px solid #f9fafb;
    background: linear-gradient(135deg, #fff5f7 0%, #ffffff 100%);
}

.modal-header h2 {
    margin: 0;
    color: #e5233e;
    font-size: 22px;
    font-weight: 700;
}

.close-btn {
    background: white;
    border: 2px solid #f0f0f0;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
}

/* Driver Details */
.driver-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.details-section {
    background: #f9fafb;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #f0f0f0;
}

.details-section h3 {
    margin: 0 0 16px 0;
    color: #e5233e;
    font-size: 16px;
    font-weight: 700;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-weight: 600;
    font-size: 14px;
}

.detail-value {
    color: #222;
    font-weight: 500;
    font-size: 14px;
    text-align: right;
}

/* Button Info */
.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    font-family: 'Poppins', sans-serif;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Navigation */
.main-nav {
    background: white;
    padding: 18px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(255, 29, 68, 0.1);
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 14px 28px;
    border: 2px solid #f0f0f0;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    font-family: 'Poppins', sans-serif;
}

.nav-btn:hover {
    border-color: #ff3d5a;
    color: #ff3d5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 61, 90, 0.2);
}

.nav-btn.active {
    background: linear-gradient(135deg, #ff3d5a 0%, #ff1744 100%);
    color: white;
    border-color: #ff3d5a;
    box-shadow: 0 4px 12px rgba(255, 29, 68, 0.3);
}

/* Period Selector */
.period-selector {
    margin-bottom: 25px;
}

.period-selector h3 {
    color: #222;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 700;
}

.period-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.period-btn {
    padding: 12px 24px;
    border: 2px solid #f0f0f0;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.period-btn:hover {
    border-color: #ff3d5a;
    color: #ff3d5a;
}

.period-btn.active {
    background: linear-gradient(135deg, #ff3d5a 0%, #ff1744 100%);
    color: white;
    border-color: #ff3d5a;
    box-shadow: 0 2px 8px rgba(255, 29, 68, 0.2);
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: linear-gradient(135deg, #fff5f7 0%, #ffffff 100%);
    padding: 24px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(255, 61, 90, 0.08);
    border: 1px solid rgba(255, 213, 220, 0.3);
}

.chart-card h3 {
    color: #e5233e;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 700;
}

.chart-card canvas {
    max-height: 300px;
}

/* Top Performers & Recent Trips */
.top-performers,
.recent-trips {
    margin-top: 30px;
}

.top-performers h3,
.recent-trips h3 {
    color: #222;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Trip State Badge */
.trip-state-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.trip-state-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.trip-state-badge.in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.trip-state-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.trip-state-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

/* Logout Button */
.btn-logout {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    font-family: 'Poppins', sans-serif;
}

.btn-logout:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ================================
   NOTIFICATION SYSTEM
================================= */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    pointer-events: none;
}

/* Individual Toast */
.toast {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #667085;
    position: relative;
    overflow: hidden;
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Toast Icon */
.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.toast-source {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 20px;
    background: #f3f4f6;
    color: #667085;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a2e;
    margin: 0;
}

.toast-message {
    font-size: 13px;
    color: #667085;
    margin: 0;
    line-height: 1.5;
}

/* Toast Close Button */
.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toastProgress linear forwards;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Toast Types */
.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-success .toast-icon {
    background: #d1fae5;
    color: #059669;
}

.toast.toast-success .toast-source {
    background: #d1fae5;
    color: #059669;
}

.toast.toast-success .toast-progress {
    background: #10b981;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-error .toast-icon {
    background: #fee2e2;
    color: #dc2626;
}

.toast.toast-error .toast-source {
    background: #fee2e2;
    color: #dc2626;
}

.toast.toast-error .toast-progress {
    background: #ef4444;
}

.toast.toast-warning {
    border-left-color: #f59e0b;
}

.toast.toast-warning .toast-icon {
    background: #fef3c7;
    color: #d97706;
}

.toast.toast-warning .toast-source {
    background: #fef3c7;
    color: #d97706;
}

.toast.toast-warning .toast-progress {
    background: #f59e0b;
}

.toast.toast-info {
    border-left-color: #3b82f6;
}

.toast.toast-info .toast-icon {
    background: #dbeafe;
    color: #2563eb;
}

.toast.toast-info .toast-source {
    background: #dbeafe;
    color: #2563eb;
}

.toast.toast-info .toast-progress {
    background: #3b82f6;
}

/* ================================
   CONFIRMATION MODAL
================================= */

.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confirm-modal {
    background: white;
    border-radius: 24px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 16px;
}

.confirm-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.confirm-modal-icon.warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.confirm-modal-icon.danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.confirm-modal-icon.info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.confirm-modal-icon.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.confirm-modal-title {
    flex: 1;
}

.confirm-modal-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.confirm-modal-title .modal-source {
    font-size: 11px;
    font-weight: 600;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.confirm-modal-body {
    padding: 0 24px 20px;
}

.confirm-modal-message {
    font-size: 14px;
    color: #667085;
    line-height: 1.6;
    margin: 0;
}

/* Prompt Input */
.confirm-modal-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.confirm-modal-input:focus {
    outline: none;
    border-color: #ff3d5a;
    box-shadow: 0 0 0 3px rgba(255, 61, 90, 0.1);
}

.confirm-modal-input::placeholder {
    color: #9ca3af;
}

.confirm-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    justify-content: flex-end;
}

.confirm-modal-footer .btn {
    min-width: 100px;
}

/* ================================
   LOADING OVERLAY
================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid #ffe8ec;
    border-top-color: #ff3d5a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    margin-top: 20px;
    font-size: 15px;
    color: #667085;
    font-weight: 500;
}

.loading-subtext {
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
}

/* Button Loading State */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

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

.btn-secondary.loading::after {
    border-color: rgba(0, 0, 0, 0.2);
    border-top-color: #333;
}

/* ================================
   INLINE BUTTON SPINNER
================================= */

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

/* ================================
   ADMIN MANAGEMENT SECTION
================================= */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title svg {
    color: #FF3D5A;
}

.section-title h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #1a1a2e;
}

/* Roles Info Section */
.roles-info {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.roles-info h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: #374151;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.role-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.role-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.role-icon.super-admin {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.role-icon.admin {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.role-icon.viewer {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4338ca;
}

.role-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #1a1a2e;
}

.role-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

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

.role-badge.super-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-badge.admin {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge.viewer {
    background: #e0e7ff;
    color: #4338ca;
}

/* Add Admin Modal */
.add-admin-modal .form-group {
    margin-bottom: 20px;
}

.add-admin-modal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.add-admin-modal input,
.add-admin-modal select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.add-admin-modal input:focus,
.add-admin-modal select:focus {
    outline: none;
    border-color: #FF3D5A;
    box-shadow: 0 0 0 3px rgba(255, 61, 90, 0.1);
}

.add-admin-modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ================================
   FORGOT PASSWORD
================================= */

.forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #ff3d5a;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-password-link:hover {
    color: #ff1744;
    text-decoration: underline;
}

/* Forgot Password Modal */
.forgot-password-modal .modal-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8ec 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forgot-password-modal .modal-icon-container svg {
    color: #ff3d5a;
}

.forgot-password-modal .modal-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.forgot-password-modal .modal-description {
    text-align: center;
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.forgot-password-modal .form-group {
    margin-bottom: 20px;
}

.forgot-password-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.forgot-password-modal .form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.forgot-password-modal .form-group input:focus {
    outline: none;
    border-color: #ff3d5a;
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 61, 90, 0.1);
}

.forgot-password-modal .form-group input::placeholder {
    color: #9ca3af;
}

.forgot-password-modal .modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.forgot-password-modal .modal-actions .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    margin-top: 0;
}

.forgot-password-modal .modal-actions .btn-link {
    background: none;
    border: none;
    color: #667085;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px;
    font-family: 'Poppins', sans-serif;
    transition: color 0.2s ease;
}

.forgot-password-modal .modal-actions .btn-link:hover {
    color: #ff3d5a;
}

/* Success State */
.forgot-password-modal .success-state {
    text-align: center;
    padding: 20px 0;
}

.forgot-password-modal .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.forgot-password-modal .success-icon svg {
    color: #059669;
}

.forgot-password-modal .success-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.forgot-password-modal .success-message {
    color: #667085;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.forgot-password-modal .success-email {
    color: #ff3d5a;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 24px;
}

.forgot-password-modal .success-hint {
    color: #9ca3af;
    font-size: 13px;
    margin-bottom: 24px;
}

/* Error State in Modal */
.forgot-password-modal .modal-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.forgot-password-modal .modal-error svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
        border-radius: 25px;
    }

    .header h1 {
        font-size: 22px;
        flex-direction: column;
    }

    .header-logo {
        height: 40px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: scroll;
        border-radius: 15px;
    }

    .users-table {
        min-width: 800px;
    }

    .filters,
    .profile-type-buttons,
    .period-buttons {
        flex-direction: column;
    }

    .filter-btn,
    .profile-type-btn,
    .period-btn {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 20px;
    }

    .detail-row {
        flex-direction: column;
        gap: 6px;
    }

    .detail-value {
        text-align: left;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .main-nav {
        flex-direction: column;
        padding: 15px;
        border-radius: 20px;
    }

    .nav-btn {
        width: 100%;
    }

    .dashboard {
        padding: 20px;
        border-radius: 20px;
    }

    .login-box {
        padding: 35px 25px;
        border-radius: 25px;
    }

    /* Toast Responsive */
    .toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .toast {
        border-radius: 12px;
    }

    /* Modal Responsive */
    .confirm-modal {
        width: 95%;
        border-radius: 20px;
    }

    .confirm-modal-header {
        padding: 20px 20px 12px;
    }

    .confirm-modal-body {
        padding: 0 20px 16px;
    }

    .confirm-modal-footer {
        padding: 12px 20px 20px;
        flex-direction: column;
    }

    .confirm-modal-footer .btn {
        width: 100%;
    }
}
