/* Modern Member Portal System - 2026 Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Color Palette */
    --primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-solid: #667eea;
    --primary-light: #8b9efc;
    --primary-dark: #5568d3;
    --secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --secondary-solid: #f093fb;
    --success: #4ade80;
    --success-light: #86efac;
    --danger: #f87171;
    --danger-light: #fca5a5;
    --warning: #fbbf24;
    --warning-light: #fcd34d;
    --info: #38bdf8;
    --info-light: #7dd3fc;
    
    /* Neutrals */
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --lighter: #f8fafc;
    --white: #ffffff;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px rgba(0,0,0,0.15);
    
    /* Borders */
    --border: 1px solid #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    
    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 70px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.hcontainer {
    margin: 0 auto;
    padding: 0 24px;
}

/* Modern Header with Glassmorphism */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 40px;
}

.logo {
    flex: 1;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.language-selector select {
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
    border: var(--border);
    background: white;
    color: var(--dark);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.language-selector select:hover {
    border-color: var(--primary-solid);
    box-shadow: var(--shadow);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--primary-solid);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu .user-name {
    color: var(--dark);
    font-weight: 500;
    padding: 8px 16px;
    background: var(--lighter);
    border-radius: var(--border-radius-sm);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-solid);
    color: white;
    border: none;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    font-size: 20px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 9999;
    pointer-events: auto;
}

.mobile-menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    opacity: 0.9;
}

.mobile-menu-toggle:active {
    transform: translateY(0);
    opacity: 1;
}

/* Layout with Modern Sidebar */
.layout-wrapper {
    display: flex;
    min-height: calc(100vh - var(--header-height));
}

/* Modern Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    position: fixed;
    left: 0;
    top: 70px;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar-menu li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-solid);
    transform: scaleY(0);
    transition: var(--transition);
}

.sidebar-menu li a:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.08), transparent);
    color: var(--primary-solid);
    transform: translateX(4px);
}

.sidebar-menu li a:hover::before {
    transform: scaleY(1);
}

.sidebar-menu li a.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.1));
    color: var(--primary-solid);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.sidebar-menu li a.active::before {
    transform: scaleY(1);
}

.sidebar-menu li a span.icon {
    font-size: 22px;
    margin-right: 12px;
    width: 28px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-menu li a:hover span.icon {
    transform: scale(1.1);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    transition: var(--transition);
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modern Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid var(--lighter);
    padding-bottom: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.card-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    letter-spacing: -0.5px;
}

.card-header h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--primary);
    margin-right: 12px;
    border-radius: 2px;
    vertical-align: middle;
}

/* Modern Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    transition: var(--transition);
    background: white;
    color: var(--dark);
}

.form-control:hover {
    border-color: var(--gray-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-solid);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Modern Gradient Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 28px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
    letter-spacing: 0.3px;
}

.btn::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 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 222, 128, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(248, 113, 113, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(100, 116, 139, 0.3);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Modern Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: white;
}

.table th,
.table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 700;
    color: var(--dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.03), transparent);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Modern Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert::before {
    content: '';
    width: 4px;
    height: 24px;
    border-radius: 2px;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #86efac;
}

.alert-success::before {
    background: var(--success);
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-error::before {
    background: var(--danger);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e3a8a;
    border: 1px solid #93c5fd;
}

.alert-info::before {
    background: var(--info);
}

/* Modern Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #86efac;
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e3a8a;
    border: 1px solid #93c5fd;
}

/* Modern Banner Carousel */
.banner-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 24px;
}

.banner-slide {
    display: none;
    position: relative;
}

.banner-slide.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.banner-slide img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.6), transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 40px;
}

.banner-content h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 16px;
    opacity: 0.95;
    margin-bottom: 16px;
}

/* Realistic Membership Card - Front & Back */
.card-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--border-radius);
    flex-wrap: wrap;
}

.real-card {
    width: 420px;
    height: 265px;
    border-radius: 18px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 
                0 0 0 1px rgba(255,255,255,0.2),
                inset 0 1px 0 rgba(255,255,255,0.1);
    transition: var(--transition);
    overflow: hidden;
}

.real-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}

/* FRONT CARD DESIGN */
.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 26px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Decorative Background Patterns */
.card-front::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.card-front::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

/* Card Chip */
.card-chip {
    position: absolute;
    top: 18px;
    right: 28px;
    width: 40px;
    height: 32px;
    background: linear-gradient(135deg, #f0c27b 0%, #daa520 100%);
    border-radius: 5px;
    padding: 3px;
    z-index: 2;
}

.chip-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8b55f 0%, #c9961a 100%);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 3px;
}

.chip-line {
    height: 2px;
    background: rgba(0,0,0,0.2);
    border-radius: 1px;
}

/* Organization Section */
.card-org {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.org-icon {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 1px solid rgba(255,255,255,0.2);
}

.org-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    line-height: 1.2;
}

.org-sub {
    font-size: 8px;
    letter-spacing: 1.3px;
    opacity: 0.9;
    font-weight: 600;
    margin-top: 1px;
}

/* Main Content */
.card-main {
    display: flex;
    gap: 14px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.card-photo {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #64748b;
    font-size: 32px;
}

.card-name {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.name-label {
    font-size: 8px;
    letter-spacing: 0.8px;
    opacity: 0.85;
    font-weight: 700;
    margin-bottom: 3px;
}

.name-value {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Member ID */
.card-id {
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.id-label {
    font-size: 8px;
    letter-spacing: 0.8px;
    opacity: 0.85;
    font-weight: 700;
    margin-bottom: 3px;
}

.id-value {
    font-size: 17px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Card Dates */
.card-dates {
    display: flex;
    gap: 12px;
    padding-top: 5px;
    border-top: 1px solid rgba(255,255,255,0.25);
    position: relative;
    z-index: 1;
    margin-bottom: 5px;
}

.date-item {
    flex: 1;
}

.date-label {
    font-size: 7px;
    letter-spacing: 0.6px;
    opacity: 0.85;
    font-weight: 700;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.date-value {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.date-value.status-active {
    color: #4ade80;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.date-value.status-pending {
    color: #fbbf24;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

/* Card Number */
.card-number {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 1.5px;
    opacity: 0.75;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* BACK CARD DESIGN */
.card-back {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--dark);
    padding: 0;
}

/* Magnetic Strip */
.mag-strip {
    width: 100%;
    height: 50px;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    margin-bottom: 20px;
}

/* Signature Panel */
.signature-panel {
    padding: 0 32px;
    margin-bottom: 5px;
}

.sig-label {
    font-size: 8px;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 5px;
}

.sig-box {
    height: 45px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    background: linear-gradient(90deg, rgba(102,126,234,0.03) 0%, white 100%);
}

/* Back Info */
.back-info {
    padding: 0 32px 5px;
}

.back-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #667eea;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.back-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 11px;
}

.back-label {
    color: #64748b;
    font-weight: 600;
}

.back-value {
    color: var(--dark);
    font-weight: 700;
    text-align: right;
}

/* Barcode */
.back-barcode {
    padding: 0 32px 20px;
    text-align: center;
}

.barcode {
    width: 100%;
    max-width: 250px;
    height: 40px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.barcode-text {
    font-size: 11px;
    color: #64748b;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    font-weight: 700;
}

/* Back Footer */
.back-footer {
    padding: 15px 32px;
    background: rgba(102,126,234,0.08);
    border-top: 1px solid rgba(102,126,234,0.15);
    text-align: center;
}

.back-footer p {
    margin: 0;
    font-size: 9px;
    color: #64748b;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .card-display {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .card-display {
        flex-direction: column;
        gap: 40px;
        padding: 40px 20px;
    }
    
    .real-card {
        width: 100%;
        max-width: 400px;
    }
    
    .real-card:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 480px) {
    .real-card {
        width: 100%;
        max-width: 360px;
        height: 240px;
    }
    
    .card-front {
        padding: 22px 26px;
    }
    
    .card-chip {
        width: 40px;
        height: 32px;
        top: 18px;
        right: 26px;
    }
    
    .card-photo {
        width: 70px;
        height: 70px;
    }
    
    .name-value {
        font-size: 16px;
    }
    
    .id-value {
        font-size: 17px;
    }
    
    .card-number {
        font-size: 14px;
        bottom: 22px;
        left: 26px;
    }
    
    .mag-strip {
        height: 45px;
    }
    
    .signature-panel,
    .back-info,
    .back-barcode {
        padding: 0 26px 15px;
    }
    
    .sig-box {
        height: 40px;
    }
}

/* Print Styles */
@media print {
    .card-display {
        background: none;
        padding: 0;
        gap: 30px;
    }
    
    .real-card {
        box-shadow: none;
        border: 2px solid #667eea;
        page-break-inside: avoid;
    }
    
    .real-card:hover {
        transform: none;
    }
    
    .card-front::before,
    .card-front::after {
        display: none;
    }
}

/* Modern Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    animation: pulse 4s ease-in-out infinite;
}

.auth-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.auth-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 48px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 480px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--dark);
    font-size: 28px;
    font-weight: 700;
}

/* Modern Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Modern Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 36px;
    border-radius: var(--border-radius-lg);
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--lighter);
}

.modal-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

.modal-close {
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--danger);
    background: var(--lighter);
    transform: rotate(90deg);
}

/* Modern Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px 0;
    text-align: center;
    color: var(--gray);
    margin-top: 48px;
    box-shadow: var(--shadow);
    border-top: 1px solid rgba(226, 232, 240, 0.8);
}

footer p {
    margin: 0;
    font-weight: 500;
}

/* Modern Responsive Design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }
    
    .main-content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 12px 0;
    }
    
    .header-content {
        gap: 12px;
    }
    
    .logo {
        flex: 1;
        order: 1;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    /* Show hamburger menu on mobile */
    .mobile-menu-toggle {
        display: flex;
        order: 0;
        flex-shrink: 0;
    }
    
    .user-info {
        order: 2;
        flex-wrap: nowrap;
        gap: 10px;
    }
    
    /* Hide user name on mobile */
    .user-menu .user-name {
        display: none;
    }
    
    .user-menu {
        gap: 8px;
    }
    
    /* Mobile Sidebar - CRITICAL POSITIONING */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 85% !important;
        max-width: 320px !important;
        transform: translateX(-100%) !important;
        box-shadow: var(--shadow-xl) !important;
        z-index: 1001 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    /* Mobile Sidebar OPEN State */
    .sidebar.mobile-visible {
        transform: translateX(0) !important;
    }
    
    /* Overlay */
    .sidebar-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 1000 !important;
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .banner-slide img {
        height: 280px;
    }
    
    .banner-content {
        padding: 24px;
    }
    
    .banner-content h3 {
        font-size: 22px;
    }
    
    .card {
        padding: 20px;
        border-radius: 10px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-header h2 {
        font-size: 20px;
    }
    
    .table-responsive {
        border-radius: var(--border-radius-sm);
        margin: 0 -20px;
        padding: 0 20px;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
    }
    
    .auth-box {
        padding: 32px 24px;
    }
    
    .modal-content {
        width: 95%;
        padding: 24px;
    }
    
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .btn {
        font-size: 14px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .mobile-menu-toggle {
        padding: 10px 14px;
        font-size: 16px;
    }
    
    .language-selector select {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .sidebar {
        width: 90%;
        max-width: 300px;
    }
    
    .main-content {
        padding: 16px 12px;
    }
    
    .card {
        padding: 16px;
    }
    
    .card-header h2 {
        font-size: 18px;
    }
    
    .auth-box {
        padding: 24px 20px;
    }
    
    .auth-box h2 {
        font-size: 22px;
    }
    
    .banner-slide img {
        height: 220px;
    }
    
    .banner-content {
        padding: 20px;
    }
    
    .banner-content h3 {
        font-size: 18px;
    }
    
    .banner-content p {
        font-size: 14px;
    }
    
    .btn {
        padding: 11px 18px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .modal-content {
        padding: 20px;
        border-radius: 12px;
    }
    
    .ecard {
        padding: 24px;
    }
    
    .ecard-photo {
        width: 100px;
        height: 100px;
    }
    
    .badge {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .alert {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-solid);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--lighter);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* Selection */
::selection {
    background: rgba(102, 126, 234, 0.2);
    color: var(--dark);
}