:root {
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-glow: rgba(2, 132, 199, 0.15);
    
    --success: #10b981;
    --success-light: #34d399;
    --success-glow: rgba(16, 185, 129, 0.15);
    
    --danger: #f43f5e;
    --danger-light: #fb7185;
    
    --warning: #f59e0b;
    
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    --white: #ffffff;
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 20px 40px -15px rgba(2, 132, 199, 0.15);
    --borderRadius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: radial-gradient(circle at top right, #f1f5f9 0%, #cbd5e1 100%);
    color: var(--slate-800);
    min-height: 100vh;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* Header & Typography */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--slate-900);
    font-weight: 700;
}

/* Header Styles */
.sys-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.header-brand i {
    font-size: 1.8rem;
    color: var(--primary);
    animation: heartbeat 2s infinite ease-in-out;
}

.brand-text h1 {
    font-size: 1.25rem;
    line-height: 1.1;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--slate-700);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

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

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--slate-100);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid var(--slate-200);
}

.user-avatar {
    width: 26px;
    height: 26px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--slate-700);
}

.btn-header-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.btn-header-link:hover {
    background: var(--slate-100);
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-header-link.logout {
    border-color: rgba(244, 63, 94, 0.2);
    color: var(--danger);
}

.btn-header-link.logout:hover {
    background: rgba(244, 63, 94, 0.05);
    border-color: var(--danger);
}

/* Premium Main Cards */
.main-wrapper {
    flex: 1;
    max-width: 900px;
    width: 95%;
    margin: 3rem auto;
}

.premium-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-premium);
    border-radius: 24px;
    padding: 3.5rem 3rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Custom styled inputs */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--slate-700);
    margin-bottom: 0.6rem;
}

.form-input {
    width: 100%;
    padding: 1.1rem 1.3rem;
    border: 2px solid var(--slate-200);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--white);
    color: var(--slate-800);
    transition: var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: var(--slate-300);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Custom interactive Radio Grid */
.ubs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: var(--slate-50);
}

.ubs-item {
    position: relative;
    cursor: pointer;
}

.ubs-item input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.ubs-box {
    background: var(--white);
    border: 2px solid var(--slate-200);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--slate-700);
    height: 100%;
    transition: var(--transition);
}

.ubs-box i {
    font-size: 1.1rem;
    color: var(--slate-300);
    transition: var(--transition);
}

.ubs-item:hover .ubs-box {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.ubs-item input:checked + .ubs-box {
    border-color: var(--primary);
    background: rgba(2, 132, 199, 0.03);
    color: var(--primary);
}

.ubs-item input:checked + .ubs-box i {
    color: var(--primary);
    transform: scale(1.15);
}

/* Custom confirm/add UBS styles */
.add-ubs-container {
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed var(--slate-300);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

/* Premium Buttons */
.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, #0369a1 100%);
    color: var(--white);
    border: none;
    padding: 1.1rem 2.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.35);
}

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

.btn-premium.clear {
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
    box-shadow: none;
}

.btn-premium.clear:hover {
    background: var(--slate-200);
    color: var(--slate-900);
    box-shadow: none;
}

/* Notification Alert Cards */
.alert-box {
    padding: 1.2rem 1.8rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideDown 0.4s ease forwards;
}

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

.alert-box.error {
    background: rgba(244, 63, 94, 0.1);
    color: #9f1239;
    border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Animations */
@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-premium);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-icon.primary { background: rgba(2, 132, 199, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.danger { background: rgba(244, 63, 94, 0.1); color: var(--danger); }

.stat-info h4 {
    font-size: 0.8rem;
    color: var(--slate-700);
    font-weight: 500;
    text-transform: uppercase;
}

.stat-info span {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
}

/* Modern Tables */
.table-wrapper {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    margin-top: 1.5rem;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.modern-table th {
    background: var(--slate-100);
    color: var(--slate-700);
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--slate-200);
}

.modern-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-800);
}

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

.modern-table tr:hover td {
    background: rgba(2, 132, 199, 0.01);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.primary { background: rgba(2, 132, 199, 0.1); color: var(--primary); }
.badge.slate { background: var(--slate-100); color: var(--slate-700); }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--slate-100);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-700);
}

/* Responsive Grid adjustments */
@media (max-width: 768px) {
    .sys-header {
        flex-direction: column;
        gap: 15px;
        padding: 1.5rem;
    }
    
    .premium-card {
        padding: 2rem 1.5rem;
    }
    
    .ubs-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
}

/* Print Header hidden on screen */
.print-header {
    display: none;
}

/* Dedicated Print Stylesheet */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 10pt !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Hide headers, footers, stats, buttons, forms, and actions */
    .sys-header,
    .dashboard-stats,
    .premium-card:has(form),
    .btn-header-link,
    .btn-premium,
    .action-column,
    footer,
    .premium-card > div:first-child button {
        display: none !important;
    }
    
    /* Reset main wrapper dimensions */
    .main-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Reset card container decoration */
    .premium-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    /* Print Header layout design */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 25px;
        border-bottom: 2px solid #0f172a;
        padding-bottom: 12px;
    }
    
    .print-header h2 {
        font-size: 15pt !important;
        color: #000000 !important;
        margin-bottom: 4px;
        font-family: 'Outfit', sans-serif;
        font-weight: 800;
    }
    
    .print-header h3 {
        font-size: 11pt !important;
        color: #334155 !important;
        margin-bottom: 8px;
        font-family: 'Outfit', sans-serif;
        font-weight: 600;
    }
    
    .print-header p {
        font-size: 8.5pt !important;
        color: #64748b !important;
        line-height: 1.4;
        font-weight: 400;
    }
    
    /* Table layout for page printing */
    .table-wrapper {
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        margin-top: 15px !important;
    }
    
    .modern-table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }
    
    .modern-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    .modern-table th {
        background: #f1f5f9 !important;
        color: #0f172a !important;
        border: 1px solid #cbd5e1 !important;
        font-weight: 700 !important;
        padding: 8px 10px !important;
        font-size: 8.5pt !important;
    }
    
    .modern-table td {
        background: transparent !important;
        color: #0f172a !important;
        border: 1px solid #cbd5e1 !important;
        padding: 8px 10px !important;
        font-size: 8.5pt !important;
    }
    
    .badge {
        background: transparent !important;
        color: #0f172a !important;
        padding: 0 !important;
        border: none !important;
        font-weight: 500 !important;
        font-size: 8.5pt !important;
    }
    
    .modern-table td strong {
        color: #000000 !important;
    }
}

