/* Modern CSS Design System */
:root {
    --primary-color: #ac162c;
    --primary-dark: #8a1123;
    --primary-light: #d41d3a;
    --secondary-color: #6c757d;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header & Navigation */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0 32px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 16px;
}

.header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex: 1;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: white;
    border-radius: 2px;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-toggle {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 10px;
    opacity: 0.7;
}

.dropdown-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 8px;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    pointer-events: none;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-primary) !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--bg-color) !important;
    color: var(--primary-color) !important;
}

.dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown.open .dropdown-menu {
    display: block !important;
    animation: fadeIn 0.2s ease-out;
}

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

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info .card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    box-shadow: none;
    margin: 0;
}

.user-info .card:hover {
    background: rgba(255, 255, 255, 0.2);
}

.username,
.username:visited {
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: white !important;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
}

.username:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

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

/* Mobile Hamburger Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 200;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
        height: 64px;
        flex-wrap: nowrap;
    }
    
    .header-left {
        flex: 1;
        min-width: 0;
    }
    
    .header h1 {
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .menu-toggle {
        display: flex;
        margin-left: 12px;
        flex-shrink: 0;
    }
    
    .nav-links {
        display: none !important;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        z-index: 99;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    
    .nav-links.active {
        display: flex !important;
    }
    
    .nav-links a {
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        color: white !important;
    }
    
    .nav-links a.active::after {
        display: none;
    }
    
    .nav-links a.active {
        background: rgba(255, 255, 255, 0.25);
    }
    
    .dropdown {
        width: 100%;
        position: relative;
    }
    
    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        color: white !important;
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        background: white;
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color);
        margin-top: 4px;
        min-width: 180px;
        padding: 8px;
        border-radius: var(--radius-sm);
        display: none;
        z-index: 1001;
    }

    .dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        color: var(--text-primary) !important;
        padding: 10px 14px;
        border-radius: var(--radius-sm);
        pointer-events: auto;
    }
    
    .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }
    
    .user-info {
        margin-left: auto;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .user-info .card {
        padding: 6px 10px;
        font-size: 12px;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .btn-logout {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Container */
.container {
    max-width: 1280px;
    margin: 32px auto;
    padding: 0 32px;
}

/* Cards */
.card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, #f1f5f9 100%);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(172, 22, 44, 0.05) 100%);
}

.welcome-card h2 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 28px;
    font-weight: 700;
}

.welcome-card p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Admin Card */
.admin-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.admin-card h2 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
}

/* Profile Card */
.profile-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.profile-card h2 {
    color: var(--text-primary);
    margin-bottom: 28px;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    transition: var(--transition);
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(172, 22, 44, 0.1);
}

.form-group input:disabled {
    background: var(--bg-color);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-success {
    background: var(--success-color);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: var(--info-color);
}

.btn-info:hover {
    background: #2563eb;
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-save {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-save:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-cancel {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
}

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-add {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.btn-add:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-permissions {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-right: 8px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-permissions:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-delete {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Backup page */
.backup-info {
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.backup-info code {
    background: var(--bg-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-primary);
}

.backup-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.backup-actions .btn {
    flex-direction: column;
    padding: 24px 20px;
    min-height: 140px;
    text-align: center;
    gap: 8px;
    border: 2px solid transparent;
}

.backup-actions .btn:hover {
    transform: translateY(-2px);
}

.backup-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 4px;
}

.backup-label {
    font-size: 16px;
    font-weight: 700;
}

.backup-hint {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
}

.btn-backup-full {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.btn-backup-full:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #7a0f1e 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-backup-database {
    background: var(--info-color);
}

.btn-backup-database:hover {
    background: #2563eb;
}

.btn-backup-files {
    background: var(--success-color);
}

.btn-backup-files:hover {
    background: #059669;
}

.backup-r2-option {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.backup-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

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

.backup-checkbox-label {
    user-select: none;
}

.backup-remote-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 2px dashed var(--border-color);
}

.backup-remote-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.backup-remote-hint {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--text-secondary);
}

.btn-backup-remote {
    background: #f48120;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
}

.btn-backup-remote:hover {
    background: #d96a10;
}

.btn-backup-remote .backup-icon {
    font-size: 22px;
}

.btn-backup-remote .backup-hint {
    font-size: 13px;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .backup-actions {
        grid-template-columns: 1fr;
    }

    .backup-actions .btn {
        min-height: auto;
        flex-direction: row;
        justify-content: flex-start;
        padding: 16px 20px;
        text-align: left;
    }

    .backup-icon {
        font-size: 24px;
        margin-bottom: 0;
        margin-right: 8px;
    }

    .backup-label {
        flex: 1;
    }
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
}

.alert::before {
    font-size: 20px;
    font-weight: 700;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.alert-success::before {
    content: '✓';
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-error::before {
    content: '!';
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid var(--info-color);
}

.alert-info::before {
    content: 'i';
    font-style: italic;
}

/* Tables */
table:not(.table-employees) {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table.table-employees {
    width: 100%;
    margin-top: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table:not(.table-employees) thead {
    background: var(--bg-color);
}

table:not(.table-employees) th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

table:not(.table-employees) td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-primary);
}

table:not(.table-employees) tr:last-child td {
    border-bottom: none;
}

table:not(.table-employees) tr:hover td {
    background: #f8fafc;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h2 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.page-title {
    color: var(--text-primary);
    margin-bottom: 28px;
    font-size: 32px;
    font-weight: 700;
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 36px 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Back Link */
.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
    margin-bottom: 16px;
}

.back-link:hover {
    color: var(--primary-dark);
    gap: 10px;
}

/* Role Badges */
.role-badge {
    display: inline-flex;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.role-user {
    background: #f1f5f9;
    color: #475569;
}

/* Client Info */
.client-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
}

.company-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

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

/* Employee Table Styles */
.table-employees {
    table-layout: fixed;
    border-collapse: collapse;
}

.table-employees th,
.table-employees td {
    padding: 14px 8px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table-employees th:nth-child(1),
.table-employees td:nth-child(1) { width: 11%; }

.table-employees th:nth-child(2),
.table-employees td:nth-child(2) { width: 16%; }

.table-employees th:nth-child(3),
.table-employees td:nth-child(3) { width: 12%; }

.table-employees th:nth-child(4),
.table-employees td:nth-child(4) { width: 9%; }

.table-employees th:nth-child(5),
.table-employees td:nth-child(5) { width: 14%; }

.table-employees th:nth-child(6),
.table-employees td:nth-child(6) { width: 9%; text-align: right; }

.table-employees th:nth-child(7),
.table-employees td:nth-child(7) { width: 8%; text-align: center; }

.table-employees th:nth-child(8),
.table-employees td:nth-child(8) { width: 11%; }

.table-employees th:nth-child(9),
.table-employees td:nth-child(9) { width: 10%; text-align: center; }

.table-employees th {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    background: var(--bg-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table-employees tbody tr:hover td {
    background: #f8fafc;
}

.employee-name {
    font-weight: 600;
    color: var(--text-primary);
}

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

.font-mono {
    font-family: monospace;
}

.pre-wrap {
    white-space: pre-wrap;
}

.inline-block {
    display: inline-block;
}

.pt-24 {
    padding-top: 24px;
}

.border-top {
    border-top: 1px solid var(--border-color);
}

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

.icon-lock {
    font-size: 64px;
    margin-bottom: 24px;
}

.mb-32 {
    margin-bottom: 32px;
}

.empty-state-text {
    color: #888;
    text-align: center;
    padding: 24px;
}

.text-purple {
    color: #6f42c1;
}

.mb-16 {
    margin-bottom: 16px;
}

.error-hint {
    color: #dc2626;
    margin-top: 8px;
}

.timestamp-small {
    margin-top: 4pt;
    font-size: 6pt;
    color: #666;
}

/* Print button styles for PDF pages */
.print-btn-container {
    position: fixed;
    top: 20px;
    right: 20px;
}

.print-btn {
    padding: 12px 24px;
    font-size: 14px;
    cursor: pointer;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
}

/* Checkbox grid and item */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Business Card */
.business-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.business-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.business-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.business-card h4 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.business-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Business Grid */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px;
    margin-top: 28px;
}

/* Stats */
.stats-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.stat.income .stat-value {
    color: var(--success-color);
}

.stat.expenses .stat-value {
    color: var(--danger-color);
}

.stat.profit .stat-value {
    color: var(--info-color);
}

/* Stats Card */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 28px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.stats-card h3 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stats-card .amount {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Amount Cells */
.amount-cell {
    font-weight: 700;
    font-size: 15px;
}

.amount-cell.positive {
    color: var(--success-color);
}

.amount-cell.negative {
    color: var(--danger-color);
}

/* Note Cell */
.note-cell {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    padding: 6px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    width: fit-content;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.6);
}

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

.tab.active:hover {
    background: var(--primary-dark);
    color: white;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-shared {
    background: #cffafe;
    color: #0e7490;
}

.badge-owner {
    background: #f1f5f9;
    color: #475569;
}

/* Owner Info */
.owner-info {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-style: italic;
}

/* Business Actions */
.business-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.business-actions .btn {
    flex: 1;
    min-width: 90px;
    text-align: center;
    padding: 10px 14px;
    font-size: 13px;
}

/* Shared Users */
.shared-users {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}

.shared-users h5 {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.shared-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.shared-user:last-child {
    border-bottom: none;
}

.share-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-top: 16px;
}

.share-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.share-form input[type="text"] {
    padding: 10px 14px;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 48px;
    color: var(--text-secondary);
    background: var(--bg-color);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color);
}

.empty-state h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 700;
}

.empty-state p {
    font-size: 15px;
}

/* Hint */
.hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

/* User Details */
.user-details {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.user-details p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.user-details strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Login Styles */
.login-container {
    display: flex;
    min-height: 100vh;
}

.login-left {
    width: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.login-left img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
}

.login-right {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

.login-form {
    width: 100%;
    max-width: 400px;
    padding: 48px;
}

.login-form h2 {
    margin-bottom: 36px;
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(172, 22, 44, 0.1);
}

.login-form button {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.login-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 2FA Styles */
.two-fa-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 24px;
}

.two-fa-box {
    display: flex;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 900px;
    max-width: 95vw;
}

.two-fa-login {
    flex: 1;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.two-fa-branding {
    flex: 1;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px;
    color: white;
    position: relative;
    overflow: hidden;
}

.two-fa-branding::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: pulse 6s ease-in-out infinite;
}

.two-fa-icon {
    font-size: 56px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* QR Code */
.qr-section {
    text-align: center;
    margin: 28px 0;
}

.qr-code {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    display: inline-block;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
}

.secret-code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 18px;
    letter-spacing: 4px;
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius);
    margin: 20px 0;
    word-break: break-all;
    border: 2px solid var(--border-color);
    font-weight: 600;
}

/* Status Boxes */
.status-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    border: none;
}

.status-enabled {
    background: #ecfdf5;
    border-left: 4px solid var(--success-color);
}

.status-disabled {
    background: var(--bg-color);
    border-left: 4px solid var(--border-color);
}

.status-icon {
    font-size: 36px;
}

.status-text {
    flex: 1;
}

.status-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.status-desc {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Backup Codes */
.backup-codes {
    background: #fffbeb;
    border: 2px solid #fcd34d;
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 24px;
}

.backup-codes h4 {
    color: #92400e;
    margin-bottom: 10px;
    font-weight: 700;
}

.backup-codes p {
    font-size: 14px;
    color: #b45309;
}

/* Steps */
.steps {
    text-align: left;
    margin: 24px 0;
    padding-left: 24px;
}

.steps li {
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Form Card (for password change etc) */
.form-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

.form-card h2 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 26px;
    font-weight: 700;
}

.form-card p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }
    
    .two-fa-box {
        flex-direction: column;
    }
    
    .two-fa-login,
    .two-fa-branding {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
        margin: 24px auto;
    }
    
    .login-container {
        flex-direction: column;
    }
    
    .login-left,
    .login-right {
        width: 100%;
    }
    
    .login-left {
        min-height: 200px;
    }
    
    .login-form {
        padding: 32px 24px;
    }
    
    .business-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .stat {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* Admin Permissions Page Styles */
.permissions-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto;
}

.permissions-card h2 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info-box {
    background: var(--bg-color);
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.user-info-box p {
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--text-primary);
}

.user-info-box p:last-child {
    margin-bottom: 0;
}

.user-info-box strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.permissions-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 28px;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.permissions-table thead {
    background: var(--bg-color);
}

.permissions-table th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.permissions-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

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

.permissions-table tr:hover td {
    background: #f8fafc;
}

.module-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 4px;
}

.module-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-cell {
    text-align: center;
    width: 120px;
}

.checkbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn-group .btn-save,
.btn-group .btn-cancel {
    margin: 0;
}

/* Stats Grid for Analytics Page */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.stat-card .amount {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-card.income::before {
    background: linear-gradient(90deg, var(--success-color), #34d399);
}

.stat-card.income .amount {
    color: var(--success-color);
}

.stat-card.expenses::before {
    background: linear-gradient(90deg, var(--danger-color), #f87171);
}

.stat-card.expenses .amount {
    color: var(--danger-color);
}

.stat-card.profit::before {
    background: linear-gradient(90deg, var(--info-color), #60a5fa);
}

.stat-card.profit .amount {
    color: var(--info-color);
}

/* Filter Bar Styles */
.filter-bar {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(172, 22, 44, 0.1);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MIGRATED STYLES - Consolidated from PHP files
   ============================================ */

/* Stats Grid & Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin: 0 0 8px 0;
}

.stat-card .amount {
    font-size: 28px;
    font-weight: 600;
}

/* List styles */
.list-plain {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.list-item:last-child {
    border-bottom: none;
}

/* Text utilities */
.text-muted {
    color: #666;
}

.text-muted-light {
    color: #999;
}

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

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

.text-green {
    color: #28a745;
}

.text-red {
    color: #dc3545;
}

/* Margin utilities */
.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-32 {
    margin-top: 32px;
}

.mb-24 {
    margin-bottom: 24px;
}

.mb-0 {
    margin-bottom: 0;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-2-gap-16 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .grid-2,
    .grid-2-gap-16 {
        grid-template-columns: 1fr;
    }
}

/* Summary cards */
.summary-box {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.summary-box h4 {
    margin: 0 0 8px 0;
}

.summary-amount {
    font-size: 24px;
    font-weight: 600;
}

/* Table styles */
.table-plain {
    width: 100%;
    border-collapse: collapse;
}

.table-plain th,
.table-plain td {
    padding: 8px;
    text-align: left;
}

.table-plain th {
    border-bottom: 2px solid #eee;
}

.table-plain tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.table-header-row {
    border-bottom: 2px solid #eee;
}

.table-row {
    border-bottom: 1px solid #f0f0f0;
}

.table-plain td.text-right {
    text-align: right;
}

.table-plain td.text-center {
    text-align: center;
}

.table-plain td.text-right.font-medium {
    font-weight: 500;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
}

.status-draft {
    background: #6c757d;
}

.status-sent {
    background: #17a2b8;
}

.status-overdue {
    background: #dc3545;
}

.status-pending,
.status-default {
    background: #ffc107;
    color: #333;
}

/* Overdue styling */
.overdue {
    color: #dc3545;
    font-weight: 600;
}

/* Empty state */
.empty-state {
    color: #888;
    text-align: center;
    padding: 24px;
}

.empty-state-left {
    color: #888;
}

/* Link styles */
.link-primary {
    color: var(--primary-color);
    text-decoration: none;
}

.link-primary:hover {
    text-decoration: underline;
}

/* Button variants */
.btn-blue {
    background-color: #3b82f6;
}

.btn-blue:hover {
    background-color: #2563eb;
}

.btn-purple {
    background: #6f42c1;
    color: white;
}

.btn-purple:hover {
    background: #5a32a3;
}

/* Flex utilities */
.flex {
    display: flex;
}

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

.gap-4 {
    gap: 4px;
}

/* Text utilities */
.text-sm {
    font-size: 13px;
}

.signed-badge {
    margin-top: 8px;
    font-size: 12px;
    color: #10b981;
}

.timestamp {
    margin-top: 5px;
    font-size: 9px;
    color: #666;
}

.btn-lg {
    font-size: 16px;
    padding: 12px 32px;
}

.h-fit {
    height: fit-content;
}

.spacer-80 {
    height: 80px;
}

.block {
    display: block;
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-info {
    color: var(--info-color);
}

.text-warning {
    color: var(--warning-color);
}

.cursor-pointer {
    cursor: pointer;
}

.btn-secondary-sm {
    background-color: #6c757d;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.btn-secondary-sm:hover {
    background-color: #5a6268;
}

/* Form helpers */
.form-group-flex-2 {
    flex: 2;
}

/* Filter bar styles */
.filter-bar {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
    white-space: nowrap;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 120px;
}

.status-select {
    font-size: 12px;
}

.employee-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-color);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    border-color: var(--primary-color);
    background: rgba(172, 22, 44, 0.05);
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-item label {
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.employee-list {
    font-size: 0.9em;
    line-height: 1.4;
}

/* Button variants */
.btn-blue {
    background-color: #3b82f6;
}

.btn-blue:hover {
    background-color: #2563eb;
}

/* Hidden elements */
.hidden {
    display: none;
}

/* Inline display for forms */
.inline-form-group {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

/* Font utilities */
.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

/* Small text */
small.text-muted {
    color: #666;
}

.btn-green {
    background: #10b981;
}

.btn-green:hover {
    background: #059669;
}

.btn-gray {
    background: #6b7280;
}

.btn-gray:hover {
    background: #4b5563;
}

.text-gray {
    color: #6b7280;
}

.mb-12 {
    margin-bottom: 12px;
}

.inline-form-group {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.btn-small-static {
    margin-top: 0;
    padding: 10px 20px;
    font-size: 14px;
}

/* Security row */
.security-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.security-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.security-desc {
    font-size: 14px;
    color: #666;
}

/* Info text with link */
.info-text-small {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* Margin for description */
.section-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color) !important;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Permission specific styles */
.permissions-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.permissions-card h2 {
    color: var(--text-primary);
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
}

.user-info-box {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.user-info-box p {
    margin: 4px 0;
}

.permissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.permissions-table th {
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.permissions-table th.text-center {
    text-align: center;
}

.permissions-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

.checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.module-name {
    font-weight: 600;
    color: var(--text-primary);
}

.module-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Template styles */
.template-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.template-card h4 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
}

.template-card p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.template-meta {
    font-size: 12px;
    color: #888;
}

.template-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.template-form .form-row {
    margin-bottom: 16px;
}

.template-form .form-row:last-child {
    margin-bottom: 0;
}

.permissions-preview {
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
}

/* Form helpers */
.form-row-flex {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.form-row-flex > .form-group {
    flex: 1;
}

.form-row-flex > .form-group-static {
    flex: 0 0 auto;
}

.w-full {
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(172, 22, 44, 0.1);
}

/* Dropdown option text visibility fix */
select option {
    color: #1a1a1a !important;
    background: white !important;
}

.form-control option,
.filter-select option {
    color: #1a1a1a !important;
    background: white !important;
}

/* ============================================
   MOBILE RESPONSIVE - Comprehensive Styles
   ============================================ */

/* Mobile styles with very high specificity */
@media screen and (max-width: 768px) {
    /* Header structure fixes */
    .header {
        padding: 0 12px !important;
        height: 56px !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }
    
    .header-left {
        flex: 1 !important;
        min-width: 0 !important;
        gap: 12px !important;
        overflow: hidden !important;
    }
    
    .header h1 {
        font-size: 16px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex-shrink: 1 !important;
    }
    
    /* Force hide navigation links */
    .header .header-left .nav-links,
    .header .nav-links,
    nav.nav-links,
    .nav-links {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Show navigation when active */
    .header .nav-links.active,
    .nav-links.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        width: auto !important;
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        top: 56px !important;
        background: linear-gradient(135deg, #ac162c 0%, #8a1123 100%) !important;
        flex-direction: column !important;
        padding: 12px !important;
        z-index: 9999 !important;
        max-height: calc(100vh - 56px) !important;
        overflow-y: auto !important;
    }
    
    /* Force show hamburger menu */
    .header .menu-toggle,
    .menu-toggle {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-shrink: 0 !important;
        width: 28px !important;
        height: 20px !important;
        margin-left: 8px !important;
    }
    
    .menu-toggle span {
        height: 2px !important;
        background: white !important;
    }
    
    /* User info adjustments */
    .header .user-info,
    .user-info {
        gap: 6px !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }
    
    .header .user-info .card,
    .user-info .card {
        padding: 4px 8px !important;
        font-size: 11px !important;
        max-width: 70px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    .header .btn-logout,
    .btn-logout {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 12px;
        margin: 16px auto;
    }
    
    /* Card adjustments */
    .card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .card h3 {
        font-size: 16px;
    }
    
    /* Typography */
    .page-title {
        font-size: 24px;
    }
    
    .page-header h2 {
        font-size: 22px;
    }
    
    /* Tables - horizontal scroll */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Projects timeline mobile */
    .timeline-item {
        flex-direction: column;
        gap: 8px;
    }
    
    .timeline-marker {
        margin-top: 0;
        align-self: flex-start;
    }
    
    .timeline-content {
        width: 100%;
    }
    
    /* Project description */
    .project-description-content {
        font-size: 13px;
    }
    
    .project-description-content h1 { font-size: 16px; }
    .project-description-content h2 { font-size: 15px; }
    .project-description-content h3 { font-size: 14px; }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .amount {
        font-size: 20px;
    }
    
    /* Form rows */
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Modal mobile */
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    /* Client header */
    .client-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .client-info-compact {
        gap: 8px;
        font-size: 12px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Projects grid */
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    /* Filter bar */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    /* Section title */
    .section-title {
        font-size: 16px;
        margin: 24px 0 16px 0;
    }
    
    /* Quill editor mobile */
    #editor-container {
        height: 150px;
    }
    
    /* Notes */
    .add-note-form .form-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .add-note-form select.small,
    .add-note-form input[type="text"],
    .add-note-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .client-info-compact span {
        display: block;
        width: 100%;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .header-actions .btn {
        width: 100%;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .timeline-content {
        padding: 12px;
    }
    
    .project-finances-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .finance-pill {
        display: flex;
        justify-content: space-between;
    }
    
    /* Dashboard mobile fixes */
    .welcome-card {
        padding: 24px;
    }
    
    .welcome-card h2 {
        font-size: 22px;
    }
    
    .welcome-card::before {
        display: none;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .user-details {
        margin-top: 16px;
        padding-top: 16px;
    }
}

/* ============================================
   SALARY PAGE STYLES - grcka_plati_pregled
   ============================================ */

.salary-page .container {
    max-width: 1400px;
}

.salary-page .page-header {
    margin-bottom: 24px;
}

.salary-page .page-header h1 {
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
}

.salary-page .filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    flex-wrap: wrap;
}

.salary-page .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.salary-page .filter-group label {
    font-weight: 600;
    color: #374151;
}

.salary-page .filter-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.salary-page .btn-icon {
    padding: 6px 10px;
}

.salary-page .salary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.salary-page .salary-table th {
    background: #1f2937;
    color: white;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.salary-page .salary-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.salary-page .salary-table tr:hover {
    background: #f9fafb;
}

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

.salary-page .salary-table .text-right {
    text-align: right;
}

.salary-page .salary-table .text-center {
    text-align: center;
}

.salary-page .employee-name {
    font-weight: 600;
    color: #1f2937;
}

.salary-page .amount {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.salary-page .total-row {
    background: #f0fdf4 !important;
    font-weight: 700;
}

.salary-page .total-row td {
    border-top: 2px solid #10b981;
    color: #047857;
}

.salary-page .summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.salary-page .summary-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.salary-page .summary-card h4 {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.salary-page .summary-card .value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.salary-page .summary-card.total {
    background: #1f2937;
    color: white;
}

.salary-page .summary-card.total h4 {
    color: #9ca3af;
}

.salary-page .summary-card.total .value {
    color: #10b981;
}

.salary-page .actions {
    display: flex;
    gap: 6px;
}

.salary-page .period-title {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 24px;
}

.salary-page .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.salary-page .empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d1d5db;
}

/* Salary Modal Styles */
.salary-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.salary-modal .modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.salary-modal .modal-header {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.salary-modal .modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.salary-modal .modal-header .close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
}

.salary-modal .modal-body {
    padding: 24px;
}

.salary-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.salary-modal .salary-detail-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.salary-modal .salary-detail-section h4 {
    margin: 0 0 12px 0;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

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

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

.salary-modal .detail-row.highlight {
    background: #f0fdf4;
    font-weight: 700;
    color: #047857;
    margin: 0 -16px;
    padding: 12px 16px;
}

.salary-modal .detail-row.total {
    background: #1f2937;
    color: white;
    margin: 0 -16px;
    padding: 16px;
    border-radius: 0 0 8px 8px;
}

.salary-modal .detail-row.total .value {
    color: #10b981;
    font-size: 20px;
}

.salary-modal .employee-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.salary-modal .employee-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 600;
}

.salary-modal .employee-info h3 {
    margin: 0 0 4px 0;
    color: #1f2937;
}

.salary-modal .employee-info p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Распоред за движење - Day Selector */
.days-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.day-chip {
    padding: 10px 20px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    user-select: none;
    background: white;
}

.day-chip:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.day-chip.selected {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Employee Checkboxes - Shared styles for grcka_rabota.php and grcka_raspored_dvizenje.php */
.employee-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    margin-top: 8px;
}

.checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.checkbox-item:hover {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--success-color);
}

.checkbox-item label {
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}


/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.data-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1.2;
    border-bottom: 2px solid #d1d5db;
}

.data-table td {
    font-size: 14px;
}

.data-table .actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Calendar Styles for Распоред за движење */
.calendar-selector {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    background: #ffffff;
    margin-top: 8px;
    max-width: 420px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.calendar-header .btn-small {
    padding: 6px 12px;
    font-size: 13px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #374151;
}

.calendar-header span {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    text-transform: capitalize;
}

.calendar-day-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.day-header {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    padding: 8px 4px;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    background: #f8fafc;
    border: 2px solid transparent;
    min-height: 40px;
}

.calendar-day:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.calendar-day.selected {
    background: #10b981;
    color: white;
    font-weight: 600;
}

.calendar-day.today {
    border-color: #3b82f6;
    color: #3b82f6;
    font-weight: 600;
}

.calendar-day.today.selected {
    background: #3b82f6;
    color: white;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.empty:hover {
    border-color: transparent;
    background: transparent;
}

.selected-dates-preview {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f0fdf4;
    border-radius: 6px;
    border-left: 4px solid #10b981;
}

.selected-dates-preview strong {
    color: #1e293b;
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

#selectedDatesList {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Settings Tabs - Admin Settings */
.form-card > .settings-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 24px !important;
    padding-bottom: 0 !important;
    border: none !important;
}

.form-card > .settings-tabs > a,
.form-card > .settings-tabs > a:link,
.form-card > .settings-tabs > a:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    color: #64748b !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.form-card > .settings-tabs > a:hover {
    background: #f8fafc !important;
    color: #1e293b !important;
    border-color: #ac162c !important;
    text-decoration: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
}

.form-card > .settings-tabs > a.active {
    background: #ac162c !important;
    color: #ffffff !important;
    border-color: #ac162c !important;
    text-decoration: none !important;
    box-shadow: 0 10px 15px rgba(172,22,44,0.3) !important;
    transform: translateY(-2px) !important;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.test-section {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-top: 24px;
    border-left: 4px solid #10b981;
}

.test-section h4 {
    margin: 0 0 12px 0;
    color: #059669;
}

.nc-test-section {
    border-left-color: #6b7280;
}

.nc-test-section h4 {
    color: #4b5563;
}

.save-all-bar {
    background: #f8fafc;
    padding: 16px 24px;
    border-radius: 8px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e7eb;
}

/* WooCommerce Orders - Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    display: inline-block;
    line-height: 1.2;
}
.status-badge.status_pending { background: #ffc107; color: #000 !important; }
.status-badge.status_processing { background: #17a2b8; color: #fff !important; }
.status-badge.status_on_hold { background: #6c757d; color: #fff !important; }
.status-badge.status_completed { background: #28a745; color: #fff !important; }
.status-badge.status_cancelled { background: #dc3545; color: #fff !important; }
.status-badge.status_refunded { background: #6f42c1; color: #fff !important; }
.status-badge.status_failed { background: #dc3545; color: #fff !important; }
.status-badge.status_checkout_draft { background: #adb5bd; color: #000 !important; }

/* WooCommerce Orders - Filter Bar */
.filter-bar {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}
.filter-btn {
    padding: 8px 16px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.filter-btn:hover {
    background: #e0e0e0;
}
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}
.count-badge {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

/* Alert Warning */
.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Voucher Styles */
.location-list {
    max-height: 300px;
    overflow-y: auto;
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    gap: 12px;
}

.location-item span {
    font-weight: 500;
    color: var(--text-primary);
}

.location-item .btn-delete {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

.location-item:hover {
    background: var(--bg-color);
}

.location-item:last-child {
    border-bottom: none;
}

.scanned-vouchers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.scanned-voucher-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.scanned-voucher-item code {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(172, 22, 44, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

.voucher-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.label-input {
    max-width: 200px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

#qr-reader {
    border-radius: var(--radius);
    overflow: hidden;
}

#qr-reader video {
    border-radius: var(--radius);
}

#qr-reader__dashboard_section_csr span {
    color: var(--primary-color) !important;
}

#qr-reader__dashboard_section_swaplink {
    color: var(--primary-color) !important;
}

.code {
    font-family: monospace;
    background: rgba(172, 22, 44, 0.1);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* ============================================
   SMS LOGIN & DEVICE MANAGEMENT STYLES
   ============================================ */

/* SMS Login Container */
.login-sms-container {
    min-height: 100vh;
    display: flex;
}

.login-left {
    width: 50%;
    background-color: rgb(172 22 44);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-left img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.login-right {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
}

.login-form .subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

/* Code Inputs for SMS */
.code-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: nowrap;
    margin-bottom: 20px;
}

.code-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.2s;
    padding: 0;
}

.code-inputs input:focus {
    outline: none;
    border-color: rgb(172 22 44);
}

/* Phone Display in SMS Login */
.phone-display {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
}

.phone-display .btn-link {
    margin-left: 10px;
}

/* Help Text */
.help-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 20px;
}

/* Alternative Login Link */
.alternative-login {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.alternative-login a {
    color: rgb(172 22 44);
    text-decoration: none;
    font-size: 14px;
}

.alternative-login a:hover {
    text-decoration: underline;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #4a4a4a;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    accent-color: rgb(172 22 44);
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Link Button */
.btn-link {
    background: none;
    border: none;
    color: rgb(172 22 44);
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

/* ============================================
   MY DEVICES PAGE STYLES
   ============================================ */

.devices-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.devices-table th,
.devices-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.devices-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.devices-table tr.current-device {
    background-color: #e8f5e9;
}

.devices-table tr.current-device td {
    border-bottom-color: #4caf50;
}

.user-agent-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-current {
    background-color: #4caf50;
    color: white;
}

.badge-inactive {
    background-color: #9e9e9e;
    color: white;
}

.badge-active {
    background-color: #4caf50;
    color: white;
}

.badge-expired {
    background-color: #9e9e9e;
    color: white;
}

.btn-delete-sm {
    padding: 6px 12px;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
}

.btn-delete-sm:hover {
    opacity: 0.9;
}

.actions-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.btn-danger {
    padding: 12px 24px;
    background-color: #d32f2f;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.btn-danger:hover {
    background-color: #c62828;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state .help-text {
    font-size: 14px;
    margin-top: 10px;
    color: #999;
}

/* ============================================
   ADMIN DEVICES PAGE STYLES
   ============================================ */

.stats-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    min-width: 150px;
    text-align: center;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
}

.btn-filter,
.btn-reset {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.btn-filter {
    background-color: rgb(172 22 44);
    color: white;
}

.btn-reset {
    background-color: #6c757d;
    color: white;
}

.admin-card .devices-table tr:hover {
    background-color: #f8f9fa;
}

.admin-card .devices-table tr.expired-device {
    opacity: 0.6;
}

.user-details {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.user-phone {
    font-size: 12px;
    color: #999;
}

/* Responsive */
/* Header user dropdown styles */
.user-dropdown {
    margin-right: 10px;
}

.user-dropdown .dropdown-toggle {
    border: none;
    background: inherit;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.dropdown-menu-right {
    right: 0;
    left: auto;
}

.logout-link {
    color: #dc2626;
}

@media (max-width: 768px) {
    .login-left {
        display: none;
    }
    .login-right {
        width: 100%;
    }
    .login-form {
        padding: 24px;
    }
    .code-inputs input {
        width: 36px;
        height: 44px;
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .code-inputs {
        gap: 4px;
    }
    .code-inputs input {
        width: 32px;
        height: 40px;
        font-size: 16px;
    }
    .stats-cards {
        flex-direction: column;
    }
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group input,
    .filter-group select {
        min-width: auto;
    }
    .devices-table {
        font-size: 12px;
    }
    .devices-table th,
    .devices-table td {
        padding: 8px;
    }
}

/* ============================================
   CONTRACT STYLES - GrckaInternet Employment Contracts
   ============================================ */

/* Status badges for contracts */
.status-draft {
    background: #f3f4f6;
    color: #6b7280;
}
.status-sent {
    background: #dbeafe;
    color: #1e40af;
}
.status-viewed {
    background: #fef3c7;
    color: #92400e;
}
.status-signed {
    background: #d1fae5;
    color: #065f46;
}
.status-expired {
    background: #fee2e2;
    color: #991b1b;
}
.status-cancelled {
    background: #f3f4f6;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Contract view page */
.contract-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
}

.contract-view-header h1 {
    color: var(--primary-color);
    margin: 0;
}

.signed-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Contract document styling */
.contract-document {
    background: white;
    padding: 48px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.contract-header-section {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.contract-header-section > div {
    flex: 1;
}

.contract-header-section h3 {
    color: var(--primary-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.contract-header-section p {
    margin-bottom: 6px;
    font-size: 14px;
}

.contract-meta {
    background: var(--bg-color);
    padding: 16px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    gap: 32px;
}

.contract-meta p {
    margin: 0;
    font-size: 14px;
}

.contract-text {
    font-size: 15px;
    line-height: 1.8;
    text-align: justify;
}

.contract-text h3,
.contract-text h4 {
    color: var(--primary-color);
    margin-top: 24px;
    margin-bottom: 12px;
}

/* Signature section */
.signature-section {
    margin-top: 48px;
    padding: 24px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: var(--radius);
    border-left: 4px solid #10b981;
}

.signature-section h3 {
    color: #065f46;
    margin-bottom: 12px;
}

.signature-form-section {
    margin-top: 48px;
    padding: 32px;
    background: var(--bg-color);
    border-radius: var(--radius-md);
    text-align: center;
}

.signature-form-section h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.signature-form {
    max-width: 300px;
    margin: 24px auto 0;
}

.signature-code-input {
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    padding: 16px;
    width: 100%;
}

/* Contract actions */
.contract-actions {
    margin-top: 48px;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Contract form styles */
.contract-form .card {
    margin-bottom: 24px;
}

.contract-form h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 18px;
}

/* Page header with actions */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    margin: 0;
}

/* Text utilities */
.text-sm {
    font-size: 13px;
}

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

.mb-12 {
    margin-bottom: 12px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
    font-size: 16px;
}

/* Responsive contract styles */
@media (max-width: 768px) {
    .contract-document {
        padding: 24px;
    }
    
    .contract-header-section {
        flex-direction: column;
        gap: 24px;
    }
    
    .contract-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .contract-view-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

/* Inline Edit Voucher Label Styles */
.inline-edit-form {
    align-items: center;
    gap: 8px;
}

.hidden-form {
    display: none !important;
}

.inline-edit-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-width: 150px;
}

.btn-edit {
    background: #f59e0b;
    color: white;
}

.btn-edit:hover {
    background: #d97706;
}

.btn-save-inline {
    background: #22c55e;
    color: white;
    padding: 6px 10px;
}

.btn-save-inline:hover {
    background: #16a34a;
}

.btn-cancel-inline {
    background: #ef4444;
    color: white;
    padding: 6px 10px;
}

.btn-cancel-inline:hover {
    background: #dc2626;
}

/* Bulk Edit Voucher Styles */
.voucher-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#select-all {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#bulk-edit-form {
    border: 1px solid var(--border-color);
}

#bulk-lokacija-id {
    background: var(--bg-primary);
    color: var(--text-primary);
}

#bulk-count {
    font-style: italic;
}

/* History Button & Tooltip */
.btn-history {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.btn-history:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.history-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    margin-top: 0;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    min-width: 320px;
    max-width: 360px;
    max-height: 350px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 999999;
    font-size: 13px;
    color: var(--text-primary);
    overflow: visible;
}

.history-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    border: 8px solid transparent;
    border-bottom-color: #1e293b;
}

.history-tooltip.show {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

.history-tooltip h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-tooltip h4::before {
    content: '🕒';
    font-size: 16px;
}

.history-tooltip .log-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
}

.history-tooltip .log-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s ease;
}

.history-tooltip .log-item:hover {
    background: #f8fafc;
}

.history-tooltip .log-item:last-child {
    border-bottom: none;
}

.history-tooltip .log-time {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-tooltip .log-time::before {
    content: '📅';
    font-size: 10px;
}

.history-tooltip .log-user {
    color: #94a3b8;
    font-size: 10px;
    margin-left: auto;
}

.history-tooltip .log-action {
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
}

.history-tooltip .log-action.created {
    color: #059669;
    background: #d1fae5;
}

.history-tooltip .log-action.created::before {
    content: '➕';
    font-size: 10px;
}

.history-tooltip .log-action.edited {
    color: #0369a1;
    background: #e0f2fe;
}

.history-tooltip .log-action.edited::before {
    content: '✏️';
    font-size: 10px;
}

.history-tooltip .log-labels {
    color: #475569;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.history-tooltip .log-labels::before {
    content: '🏷️';
    font-size: 10px;
}

.history-tooltip .label-arrow {
    color: #94a3b8;
    font-size: 14px;
    margin: 0 2px;
}

.history-tooltip .no-logs {
    color: #94a3b8;
    font-style: italic;
    padding: 24px 16px;
    text-align: center;
    background: #f8fafc;
}

.history-tooltip .no-logs::before {
    content: '📭';
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

/* Global History Tooltip */
.history-tooltip-global {
    display: none;
    position: fixed;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0;
    min-width: 320px;
    max-width: 360px;
    max-height: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    z-index: 999999 !important;
    font-size: 13px;
    color: var(--text-primary);
    overflow: hidden;
}

.history-tooltip-global h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-tooltip-global h4::before {
    content: '🕒';
    font-size: 16px;
}

.history-tooltip-global .log-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}

.history-tooltip-global .log-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background 0.2s ease;
}

.history-tooltip-global .log-item:hover {
    background: #f8fafc;
}

.history-tooltip-global .log-item:last-child {
    border-bottom: none;
}

.history-tooltip-global .log-time {
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.history-tooltip-global .log-time::before {
    content: '📅';
    font-size: 10px;
}

.history-tooltip-global .log-user {
    color: #94a3b8;
    font-size: 10px;
    margin-left: auto;
}

.history-tooltip-global .log-action {
    font-weight: 700;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
}

.history-tooltip-global .log-action.created {
    color: #059669;
    background: #d1fae5;
}

.history-tooltip-global .log-action.created::before {
    content: '➕';
    font-size: 10px;
}

.history-tooltip-global .log-action.edited {
    color: #0369a1;
    background: #e0f2fe;
}

.history-tooltip-global .log-action.edited::before {
    content: '✏️';
    font-size: 10px;
}

.history-tooltip-global .log-labels {
    color: #475569;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.history-tooltip-global .log-labels::before {
    content: '🏷️';
    font-size: 10px;
}

.history-tooltip-global .label-arrow {
    color: #94a3b8;
    font-size: 14px;
    margin: 0 2px;
}

.history-tooltip-global .no-logs {
    color: #94a3b8;
    font-style: italic;
    padding: 24px 16px;
    text-align: center;
    background: #f8fafc;
}

.history-tooltip-global .no-logs::before {
    content: '📭';
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

/* Mobile Collapsible Sections */
.mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 8px;
    color: white;
    transition: all 0.2s ease;
}

.mobile-section-header:hover {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
}

.btn-mobile-toggle {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-mobile-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.mobile-section-content {
    transition: all 0.3s ease;
}

/* Desktop - always show content */
@media (min-width: 769px) {
    .mobile-section-header {
        background: transparent;
        color: inherit;
        padding: 0;
        cursor: default;
    }
    
    .mobile-section-header:hover {
        background: transparent;
    }
    
    .btn-mobile-toggle {
        display: none;
    }
    
    .mobile-section-content {
        display: block !important;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .mobile-collapsible {
        padding: 0;
        overflow: hidden;
    }
    
    .mobile-collapsible h3 {
        font-size: 16px;
    }
    
    .mobile-section-content {
        padding: 16px;
    }
    
    .mobile-section-content .form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .mobile-section-content input,
    .mobile-section-content select {
        width: 100%;
    }
}

/* ============================================
   TRAVEL EXPENSES MODULE - GrckaInternet
   ============================================ */

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

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

.patni-table tfoot td {
    background: var(--bg-color);
    font-weight: 700;
    border-top: 2px solid var(--border-color);
}

.patni-table tfoot td:first-child {
    border-bottom-left-radius: var(--radius);
}

.patni-table tfoot td:last-child {
    border-bottom-right-radius: var(--radius);
}

.filter-form {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.filter-form .form-row {
    align-items: flex-end;
    margin-bottom: 0;
}

.filter-form .form-group:last-child {
    margin-bottom: 0;
}

/* Development / Versions */
.version-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.version-badge.current {
    background: #d1fae5;
    color: #065f46;
}

.version-badge.old {
    background: #e2e8f0;
    color: #475569;
}

.current-version {
    background: #f0fdf4;
}

/* ============================================
   SALARY EDIT MODAL - GrckaInternet
   ============================================ */

.salary-modal .form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.salary-modal .form-row .form-group {
    flex: 1;
    min-width: 140px;
}

@media (max-width: 768px) {
    .salary-modal .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ============================================
   BUDGET MODULE - GrckaInternet
   ============================================ */

.budget-page .budget-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.budget-page .btn-toggle-all-balances {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease;
}

.budget-page .btn-toggle-all-balances:hover {
    background: #e5e7eb;
}

.budget-page .bulk-delete-form {
    margin: 0;
}

.budget-page .bulk-delete-bar {
    margin-bottom: 12px;
}

.budget-page .select-col {
    width: 40px;
    text-align: center;
}

.budget-page .select-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.budget-page .budget-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.budget-page .summary-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.budget-page .summary-card.total {
    background: #1f2937;
    color: white;
}

.budget-page .summary-card h4 {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.budget-page .summary-card.total h4 {
    color: #9ca3af;
}

.budget-page .summary-card .value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.budget-page .summary-card.total .value {
    color: #10b981;
}

.budget-page .budget-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.budget-page .budget-account-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.budget-page .budget-account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.budget-page .budget-account-card .account-name {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.budget-page .budget-account-card .account-currency {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 8px;
}

.budget-page .budget-account-card .account-balance {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.budget-page .budget-account-card .balance-eur {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
}

.budget-page .budget-account-card .balance-mkd {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.budget-page .budget-account-card .account-header .btn-icon,
.budget-page .summary-card .balance-row .btn-icon {
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.budget-page .budget-account-card .account-header .btn-icon:hover,
.budget-page .summary-card .balance-row .btn-icon:hover {
    background: #e5e7eb;
}

.budget-page .budget-account-card .account-balance .account-balance-value {
    filter: blur(8px);
    user-select: none;
    transition: filter 0.2s ease;
}

.budget-page .budget-account-card .account-balance .account-balance-value.visible {
    filter: none;
}

.budget-page .rate-form .form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    max-width: 500px;
}

.budget-page .rate-form .form-group-static {
    flex: 0 0 auto;
}

.budget-page .filter-form .btn-group {
    margin-top: 8px;
}

.budget-page .type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.budget-page .type-badge.type-deposit {
    background: #d1fae5;
    color: #065f46;
}

.budget-page .type-badge.type-withdrawal {
    background: #fee2e2;
    color: #991b1b;
}

.budget-page .type-badge.type-transfer {
    background: #dbeafe;
    color: #1e40af;
}

.budget-page .amount {
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.budget-page .table-responsive {
    overflow-x: auto;
}

.budget-page .account-table .form-input {
    min-width: 120px;
    font-size: 14px;
}

.budget-page .account-table .account-order {
    min-width: 80px;
    max-width: 100px;
}

.budget-page .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
}

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

.budget-page .inline-form {
    display: inline-block;
}

.budget-page .link-small {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
}

.budget-page .link-small:hover {
    text-decoration: underline;
}

/* Budget summary balance visibility */
.budget-page .summary-card .balance-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.budget-page .summary-card .value.balance-value {
    filter: blur(8px);
    user-select: none;
    transition: filter 0.2s ease;
}

.budget-page .summary-card .value.balance-value.visible {
    filter: none;
}


.budget-page .budget-account-card .account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

/* Budget page tables */
.budget-page .card {
    padding: 16px;
}

.budget-page .card h3 {
    margin-bottom: 12px;
}

.budget-page .data-table th,
.budget-page .data-table td {
    padding: 4px 6px;
    line-height: 1.2;
}

.budget-page .data-table td {
    font-size: 12px;
}

.budget-page .data-table th {
    font-size: 11px;
}

.budget-page .data-table .amount {
    white-space: nowrap;
}

.budget-page .data-table .cell-ellipsis {
    max-width: 130px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.budget-page .data-table .actions {
    min-width: 70px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.budget-page .data-table .text-right {
    text-align: right;
}

.budget-page .data-table tbody tr:hover {
    background: #f9fafb;
}

.budget-page .type-badge {
    font-size: 10px;
    padding: 1px 5px;
}

.budget-page .data-table .btn-small {
    padding: 2px 6px;
    font-size: 11px;
}

/* Mobile table fixes */
@media (max-width: 768px) {
    .budget-page .card {
        padding: 12px;
    }

    .budget-page .data-table th,
    .budget-page .data-table td {
        padding: 4px 5px;
        font-size: 11px;
    }

    .budget-page .data-table th {
        font-size: 9px;
    }

    .budget-page .type-badge {
        font-size: 9px;
        padding: 1px 4px;
    }

    .budget-page .data-table .btn-small {
        padding: 3px 5px;
        font-size: 10px;
    }

    .budget-page .data-table .actions {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 3px;
        min-width: 55px;
    }

    .budget-page .account-table .form-row {
        display: block;
    }

    .budget-page .account-table td {
        min-width: 100px;
    }
}

@media (max-width: 640px) {
    .budget-page .data-table .hide-mobile {
        display: none;
    }
}
