/* ============ GLOBAL STYLES ============ */
* { box-sizing: border-box; }
body {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a4e 50%, #2d1b69 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ============ TECH BACKGROUND EFFECTS ============ */
.tech-dots {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.tech-dots .dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 212, 255, 0.08);
    border-radius: 50%;
    animation: floatDot 20s infinite linear;
}
@keyframes floatDot {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ============ LOGIN ============ */
.login-container {
    max-width: 420px;
    margin: 40px auto;
    padding: 35px 30px 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    animation: slideUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
}
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00d4ff, #7b2ffc, #00d4ff);
    background-size: 200% 100%;
    animation: gradientMove 3s ease infinite;
}
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Company Logo */
.company-logo-container {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}
.company-logo {
    display: inline-block;
    position: relative;
    padding: 12px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0a0e27, #1a1a4e);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.12);
}
.company-logo .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.company-logo .logo-icon .icon-wrapper {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #00d4ff, #7b2ffc);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.company-logo .logo-text {
    text-align: left;
}
.company-logo .logo-text .company-name {
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 212, 255, 0.2);
}
.company-logo .logo-text .company-name .highlight { color: #00d4ff; }
.company-logo .logo-text .tagline {
    font-size: 10px;
    color: rgba(255,255,255,0.6);
    letter-spacing: 1.5px;
    display: block;
    margin-top: 1px;
}
.company-logo .logo-text .tagline i { color: #00d4ff; margin-right: 4px; }
.company-logo .logo-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #00d4ff, #7b2ffc);
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.4);
}
.login-container .login-title {
    color: #1a1a4e;
    text-align: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 3px;
}
.login-container .login-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    margin-bottom: 20px;
}
.login-container .form-label {
    font-weight: 500;
    color: #495057;
    font-size: 13px;
}
.login-container .form-control {
    border-radius: 10px;
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
    font-size: 14px;
}
.login-container .form-control:focus {
    border-color: #7b2ffc;
    box-shadow: 0 0 0 0.2rem rgba(123, 47, 252, 0.25);
}
.login-container .input-group-text {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: #7b2ffc;
}
.login-container .form-control {
    border-radius: 0 10px 10px 0;
}
.login-container .btn-login {
    background: linear-gradient(135deg, #7b2ffc 0%, #00d4ff 100%);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    font-size: 15px;
    letter-spacing: 0.5px;
}
.login-container .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 47, 252, 0.4);
}
.login-container .demo-credentials {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    border: 1px dashed #dee2e6;
}
.login-container .demo-credentials strong { color: #1a1a4e; }
.login-container .demo-credentials code {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #7b2ffc;
    font-weight: 600;
}

/* ============ NAVBAR ============ */
.navbar {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a4e 100%) !important;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    padding: 6px 0;
    border-bottom: 2px solid rgba(0, 212, 255, 0.08);
}
.navbar-brand {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
}
.navbar-brand .brand-icon-wrapper {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #00d4ff, #7b2ffc);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}
.navbar-brand .brand-text {
    line-height: 1.1;
}
.navbar-brand .brand-text .company-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: white;
}
.navbar-brand .brand-text .company-name .highlight { color: #00d4ff; }
.navbar-brand .brand-text .tagline {
    font-size: 8px;
    opacity: 0.6;
    letter-spacing: 1px;
    display: block;
    color: rgba(255,255,255,0.6);
}
.navbar .nav-link {
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.2s;
    color: rgba(255,255,255,0.8) !important;
    font-size: 13px;
}
.navbar .nav-link:hover {
    background: rgba(0, 212, 255, 0.1);
    color: white !important;
}
.navbar .nav-link i { margin-right: 5px; }
.navbar .nav-link.active {
    background: rgba(0, 212, 255, 0.15);
    color: white !important;
}
.navbar .dropdown-menu {
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 6px;
    background: #1a1a4e;
    border: 1px solid rgba(0, 212, 255, 0.08);
}
.navbar .dropdown-item {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}
.navbar .dropdown-item:hover {
    background: rgba(0, 212, 255, 0.1);
    color: white;
}
.navbar .dropdown-item i {
    margin-right: 8px;
    width: 18px;
    text-align: center;
    color: #00d4ff;
}
.navbar .user-info {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar .user-info .user-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #00d4ff, #7b2ffc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}
.navbar .user-info .user-role {
    background: rgba(0, 212, 255, 0.12);
    padding: 1px 10px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.15);
}
.navbar .btn-logout {
    color: rgba(255,255,255,0.6) !important;
    border-color: rgba(255,255,255,0.1) !important;
    border-radius: 6px;
    padding: 4px 14px;
    font-size: 12px;
    transition: all 0.3s;
}
.navbar .btn-logout:hover {
    background: rgba(220, 53, 69, 0.2) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
    color: white !important;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    padding: 16px 20px;
    min-height: calc(100vh - 62px);
}

/* ============ CARDS ============ */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s;
    background: white;
    margin-bottom: 16px;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(0,0,0,0.1);
}
.card-header {
    background: white;
    border-bottom: 2px solid #f0f0f0;
    padding: 12px 20px;
    border-radius: 12px 12px 0 0 !important;
}
.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #1a1a4e;
    font-size: 15px;
}
.card-header h5 i { color: #7b2ffc; }
.card-body { padding: 16px 20px; }

/* ============ TABLES ============ */
.table th {
    font-weight: 600;
    color: #1a1a4e;
    background-color: #f8f9fa;
    border-top: none;
    font-size: 12px;
    padding: 8px 10px;
}
.table td {
    vertical-align: middle;
    font-size: 12px;
    padding: 8px 10px;
}
.table-hover tbody tr:hover {
    background-color: rgba(123, 47, 252, 0.04);
}

/* ============ STATUS BADGES ============ */
.badge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 11px;
}
.badge-draft { background: #e9ecef; color: #495057; }
.badge-submitted { background: #fff3cd; color: #856404; }
.badge-approved { background: #d4edda; color: #155724; }
.badge-rejected { background: #f8d7da; color: #721c24; }
.badge-paid { background: #cce5ff; color: #004085; }
.badge-active { background: #d4edda; color: #155724; }
.badge-inactive { background: #f8d7da; color: #721c24; }

/* ============ STAT CARDS ============ */
.stat-card {
    background: white;
    padding: 12px 10px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-align: center;
    height: 100%;
    transition: all 0.3s;
    border-left: 3px solid #7b2ffc;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(123, 47, 252, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.stat-card .stat-icon {
    font-size: 20px;
    color: #7b2ffc;
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}
.stat-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 2px 0;
    color: #1a1a4e;
    position: relative;
    z-index: 1;
}
.stat-card .stat-label {
    color: #6c757d;
    font-size: 11px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ============ FORMS ============ */
.form-label {
    font-weight: 500;
    color: #495057;
    font-size: 13px;
}
.form-control, .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 8px 12px;
    transition: all 0.3s;
    font-size: 13px;
}
.form-control:focus, .form-select:focus {
    border-color: #7b2ffc;
    box-shadow: 0 0 0 0.2rem rgba(123, 47, 252, 0.2);
}
.form-control-sm, .form-select-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}

/* ============ BUTTONS ============ */
.btn {
    border-radius: 8px;
    padding: 6px 18px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 13px;
}
.btn-primary {
    background: linear-gradient(135deg, #7b2ffc, #5a1fb0);
    border: none;
    color: white;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(123, 47, 252, 0.3);
    color: white;
}
.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
    color: white;
}
.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    color: white;
}
.btn-danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    border: none;
    color: white;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    color: white;
}
.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border: none;
    color: #212529;
}
.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    color: #212529;
}
.btn-info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
    border: none;
    color: white;
}
.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
    color: white;
}
.btn-secondary {
    background: #6c757d;
    border: none;
    color: white;
}
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    color: white;
}
.btn-sm { padding: 3px 10px; font-size: 11px; border-radius: 6px; }
.btn-xs { padding: 2px 8px; font-size: 10px; border-radius: 4px; }

/* ============ TOAST NOTIFICATIONS ============ */
.toast-message {
    padding: 12px 20px;
    border-radius: 10px;
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-weight: 500;
    font-size: 14px;
    border-left: 4px solid rgba(255,255,255,0.3);
}
.toast-success { background: linear-gradient(135deg, #28a745, #20c997); }
.toast-error { background: linear-gradient(135deg, #dc3545, #ff6b6b); }
.toast-warning { background: linear-gradient(135deg, #ffc107, #fd7e14); color: #212529; }
.toast-info { background: linear-gradient(135deg, #17a2b8, #4dd0e1); }

/* ============ QUICK ACTION CARDS ============ */
.quick-action-card {
    background: white;
    padding: 20px 16px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
    border: 2px solid transparent;
}
.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    border-color: rgba(123, 47, 252, 0.15);
}
.quick-action-card i {
    font-size: 30px;
    display: block;
    margin-bottom: 10px;
}
.quick-action-card h6 {
    font-weight: 600;
    margin-bottom: 3px;
    color: #1a1a4e;
    font-size: 14px;
}
.quick-action-card p {
    color: #6c757d;
    font-size: 11px;
    margin-bottom: 10px;
}

/* ============ ROLE BADGES ============ */
.role-badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}
.role-badge-superuser { background: #dc3545; color: white; }
.role-badge-approver { background: #ffc107; color: #212529; }
.role-badge-accounts { background: #17a2b8; color: white; }
.role-badge-normaluser { background: #28a745; color: white; }

/* ============ EDIT MODE BADGE ============ */
.edit-mode-badge {
    background: #ffc107;
    color: #212529;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ============ VOUCHER HEADER ============ */
.voucher-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
}
.voucher-header .form-label {
    font-weight: 600;
    color: #1a1a4e;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============ FOOTER ============ */
.app-footer {
    text-align: center;
    padding: 10px 16px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 20px;
    background: rgba(0,0,0,0.15);
}
.app-footer strong { color: rgba(255,255,255,0.7); }
.app-footer .footer-highlight { color: #00d4ff; }
.app-footer i { color: #00d4ff; }

/* ============ MODAL OVERLAY ============ */
.modal.show {
    display: block !important;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}
.modal.show .modal-dialog {
    margin: 50px auto;
    max-width: 700px;
}
.modal.show .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .login-container { margin: 20px 12px; padding: 20px; }
    .stat-card { margin-bottom: 10px; }
    .stat-card h3 { font-size: 17px; }
    .table-responsive { font-size: 11px; }
    .btn-sm { padding: 2px 6px; font-size: 10px; }
    .navbar-brand .brand-text .company-name { font-size: 14px; }
    .navbar-brand .brand-text .tagline { font-size: 7px; }
    .company-logo .logo-text .company-name { font-size: 16px; }
    .company-logo .logo-icon .icon-wrapper { width: 38px; height: 38px; font-size: 20px; }
    .card-body { padding: 12px 14px; }
    .main-content { padding: 10px 12px; }
    .modal.show .modal-dialog { margin: 20px; }
}

/* ============ ANIMATIONS ============ */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ PRINT ============ */
@media print {
    .navbar, .btn, .no-print { display: none !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd; }
}