:root {
    /* Colors - Russell Bedford Corporate Palette */
    --bg-body: #F8F9FA;
    --bg-sidebar: #001871;
    /* Corporate Dark Blue */
    --bg-card: #FFFFFF;

    --text-primary: #001871;
    --text-secondary: #666666;
    --text-on-dark: #FFFFFF;
    --text-muted-on-dark: #D0D0D0;

    /* Russell Bedford Corporate Colors */
    --primary-color: #001871;
    /* Dark Blue */
    --primary-hover: #000f4d;
    --accent-color: #00a9ce;
    /* Cyan */
    --accent-secondary: #00bfb3;
    /* Turquesa */
    --accent-orange: #ff8b00;
    /* Naranja */
    --accent-purple: #981d97;
    /* Morado */
    --danger-color: #ff4444;
    --warning-color: #ff8b00;
    --success-color: #00bfb3;

    --border-color: #E8E8E8;
    --input-bg: #F5F5F5;

    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0px 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0px 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0px 16px 40px rgba(0, 0, 0, 0.16);
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    /* App-like feel */
}

/* Page-specific layout fixes */
body[data-page="employee"] {
    overflow-y: auto;
}

body[data-page="employee"] #viewEmployee {
    min-height: 100vh;
}

body[data-page="employee"] .emp-container {
    height: auto;
    min-height: calc(100vh - 70px);
    overflow: visible;
}

body[data-page="employee"] .emp-actions-card {
    max-height: none;
    overflow: visible;
}

/* Utility to switch views */
.view-section {
    width: 100%;
    height: 100%;
}

.view-section.hidden {
    display: none !important;
}

.hidden {
    display: none !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* --- LOGIN STYLES --- */
#viewLogin {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #001871 0%, #003399 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

#viewLogin::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(0, 169, 206, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

#viewLogin::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(0, 191, 179, 0.1);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

.login-card {
    background: white;
    padding: 48px;
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--text-primary);
    width: 400px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 24px;
    font-weight: 700;
}

.login-logo i {
    color: var(--primary-color);
    font-size: 32px;
}

.login-card h2 {
    margin-bottom: 8px;
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-login {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    transition: 0.2s;
}

.btn-login:hover {
    background: var(--primary-hover);
}

.divider {
    position: relative;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    margin: 16px 0;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.employee-login-box {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    width: 100%;
}

.employee-login-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    text-align: center;
}

.btn-login-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.btn-login-secondary:hover {
    background: var(--input-bg);
}

/* --- EMPLOYEE PORTAL STYLES --- */
#viewEmployee {
    background: var(--bg-body);
}

.emp-header {
    height: 70px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    box-shadow: var(--shadow-sm);
}

.logo-area-small {
    font-weight: 700;
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 18px;
}

.emp-container {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 24px;
    height: calc(100vh - 70px);
    overflow: hidden;
}

.emp-profile-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.emp-profile-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.emp-profile-card h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.emp-profile-card p {
    color: var(--text-secondary);
}

.emp-actions-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100%;
}

.emp-actions-card h3 {
    margin-bottom: 24px;
    font-size: 18px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .emp-container {
        padding: 24px;
        max-width: 100%;
    }

    .emp-profile-card {
        padding: 28px;
    }

    .emp-actions-card {
        padding: 24px;
    }
}

@media (max-width: 600px) {
    .emp-header {
        padding: 0 20px;
    }

    .emp-profile-card img {
        width: 96px;
        height: 96px;
    }

    .emp-profile-card h2 {
        font-size: 20px;
    }
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(255, 139, 0, 0.15);
    color: var(--accent-orange);
}

.status-approved {
    background: rgba(0, 191, 179, 0.15);
    color: var(--accent-secondary);
}

.status-rejected {
    background: rgba(255, 68, 68, 0.15);
    color: var(--danger-color);
}

/* Request Item in Admin List */
.request-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

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

.badge {
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-on-dark);
    display: flex;
    flex-direction: column;
    padding: 24px;
    flex-shrink: 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 24, 113, 0.3);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.main-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-label {
    color: var(--text-muted-on-dark);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted-on-dark);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.menu-item.active,
.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-on-dark);
}

.menu-item.active {
    background: rgba(0, 169, 206, 0.2);
    color: var(--text-on-dark);
    font-weight: 600;
    border-left: 3px solid var(--accent-color);
    padding-left: 13px;
}

.menu-item i {
    font-size: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile .avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-profile .user-info {
    display: flex;
    flex-direction: column;
}

.user-profile .name {
    font-size: 14px;
    font-weight: 600;
}

.user-profile .email {
    font-size: 12px;
    color: var(--text-muted-on-dark);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background: var(--bg-body);
}

/* Top Bar */
.top-bar {
    height: 80px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    width: 320px;
    gap: 10px;
}

.search-bar i {
    color: var(--text-secondary);
    font-size: 18px;
}

.search-bar input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 100%;
    background: transparent;
}

.actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 24, 113, 0.15);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 8px 20px rgba(0, 24, 113, 0.3);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 9px 19px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(0, 24, 113, 0.05);
}

.btn-icon {
    background: white;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
}

.btn-icon-small {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted-on-dark);
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

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

/* Dashboard Grid */
.content-area {
    flex: 1;
    padding: 0 32px 32px 32px;
    overflow-y: auto;
}

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

.page-header h1 {
    font-size: 24px;
    margin-bottom: 4px;
}


.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    height: calc(100vh - 180px);
    /* Fill remaining space */
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

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

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

.section-header h2,
.section-header h3 {
    font-size: 18px;
}

/* Employee List */
.employee-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.employee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.employee-item:hover,
.employee-item.selected {
    background: var(--input-bg);
    border-color: var(--accent-color);
}

.employee-item.selected {
    background: linear-gradient(90deg, rgba(0, 24, 113, 0.05), transparent);
    border-color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.employee-item:hover {
    box-shadow: 0 2px 8px rgba(0, 169, 206, 0.1);
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.employee-info {
    flex: 1;
    overflow: hidden;
}

.employee-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.action-btn {
    opacity: 0;
    transition: opacity 0.2s;
    background: white;
    border: 1px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
}

.employee-item:hover .action-btn {
    opacity: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #E2E2EA;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D5D5DC;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
}

.empty-state-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    text-align: center;
}

.empty-state-large i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--primary-color);
    opacity: 0.5;
}

/* Detail View Styles */
.detail-header-bg {
    height: 120px;
    background: linear-gradient(135deg, #001871 0%, #00a9ce 100%);
    border-radius: var(--radius-md);
    margin-bottom: 50px;
    /* Space for avatar overlap */
    position: relative;
    overflow: hidden;
}

.detail-header-bg::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 139, 0, 0.2));
}

.detail-content {
    position: relative;
    padding: 0 16px;
    animation: fadeIn 0.3s ease;
}

.detail-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    position: absolute;
    top: -50px;
    left: 20px;
    background: white;
}

.detail-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding-left: 130px;
    /* Space for avatar */
}

.name-large {
    font-size: 24px;
    font-weight: 700;
}

.role-large {
    color: var(--text-secondary);
    font-size: 16px;
}

.grid-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.detail-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.info-group {
    margin-bottom: 16px;
}

.info-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.info-value {
    font-weight: 500;
    font-size: 15px;
}

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s;
}

.modal-overlay.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-card);
    width: 500px;
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    transform: scale(1);
    transition: transform 0.3s;
    position: relative;
    z-index: 1001;
}

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

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

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--input-bg);
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    background: rgba(0, 24, 113, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 24, 113, 0.1);
}

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

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.code-editor {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #f9f9f9;
    resize: vertical;
}

.code-editor:focus {
    border-color: var(--primary-color);
    background: rgba(0, 24, 113, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 24, 113, 0.1);
}

.help-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    margin-bottom: 8px;
}

/* Certificate Print Styles */
/* Certificate Styles - Professional Design */
.certificate-paper {
    width: 800px;
    padding: 25px;
    background: white;
    color: #333;
    font-family: 'Georgia', 'Times New Roman', serif;
    position: relative;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.cert-corporate-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 0 25px 0;
    width: 100%;
    background-color: white;
    box-sizing: border-box;
    border-bottom: 2px solid var(--accent-color);
}

.cert-logo-img {
    height: 85px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.cert-header {
    text-align: center;
    padding: 20px 0 25px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.cert-title-container {
    margin: 0;
}

.cert-title {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 3px;
    color: var(--primary-color);
    margin: 0;
    text-transform: uppercase;
}

.cert-underline {
    display: none;
}

.cert-body {
    padding: 0;
}

.cert-intro {
    font-size: 15px;
    margin-bottom: 25px;
    font-style: italic;
    margin-top: 0;
    text-align: center;
    color: var(--primary-color);
    font-weight: 500;
}

.cert-main-text {
    font-size: 15px;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 20px;
    color: #333;
    text-indent: 2em;
}

.cert-dirigido-section {
    margin: 25px 0;
    padding: 18px;
    background: linear-gradient(135deg, rgba(0, 24, 113, 0.08), rgba(0, 169, 206, 0.08));
    border-left: 5px solid var(--accent-color);
    border-radius: 4px;
    page-break-inside: avoid;
}

.cert-dirigido-box {
    display: flex;
    gap: 15px;
}

.cert-dirigido-label {
    font-weight: bold;
    color: var(--primary-color);
    min-width: 100px;
    font-size: 15px;
}

.cert-dirigido-value {
    color: #333;
    font-size: 15px;
}

.cert-footer {
    margin-top: 50px;
    text-align: center;
    padding: 25px 0 0 0;
    border-top: 1px solid #ddd;
    page-break-inside: avoid;
}

.cert-signature-space {
    height: 60px;
    margin-bottom: 15px;
}

.signature-line {
    display: inline-block;
    padding-top: 10px;
}

.sig-title {
    font-size: 15px;
    margin-bottom: 10px;
    font-style: italic;
    font-family: 'Georgia', serif;
    color: var(--primary-color);
}

.sig-name {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: bold;
    display: block;
    margin-top: 10px;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.sig-company {
    font-size: 13px;
    color: var(--text-secondary);
    display: block;
    font-family: 'Outfit', sans-serif;
    margin-top: 3px;
}

/* --- UTILITY CLASSES --- */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.role {
    color: var(--text-secondary);
}

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

/* --- EMPLOYEE CERTIFICATE SECTION --- */

/* Certificate Limit Container */
.cert-limit-container {
    background: linear-gradient(135deg, rgba(0, 24, 113, 0.05), rgba(0, 169, 206, 0.05));
    border-left: 4px solid var(--accent-color);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
}

.cert-limit-info h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-counter {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.cert-count {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.cert-limit-text {
    font-size: 20px;
    color: var(--text-secondary);
}

.cert-limit {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Certificate History Container */
.cert-history-container {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    overflow-y: auto;
    flex: 1;
}

.cert-history-container h4 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 600;
}

.cert-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--input-bg);
    border-left: 3px solid var(--accent-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.cert-history-item:hover {
    background: rgba(0, 169, 206, 0.1);
    box-shadow: var(--shadow-sm);
}

.cert-history-item-info {
    flex: 1;
}

.cert-history-dirigido {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cert-history-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.cert-history-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.cert-status-pending {
    background: rgba(255, 139, 0, 0.2);
    color: var(--accent-orange);
}

.cert-status-approved {
    background: rgba(0, 191, 179, 0.2);
    color: var(--accent-secondary);
}

.cert-status-rejected {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger-color);
}

.empty-state-small {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
}

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

/* Requests Card with Scroll */
.requests-card {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.requests-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-right: 4px;
}

/* Print-specific adjustments to avoid extra blank pages when exporting PDF */
@media print {
    /* Allow content to size naturally for printing */
    body, .app-container, .view-section {
        height: auto !important;
        overflow: visible !important;
    }

    /* Make the certificate render without shadows/margins that can cause extra pages */
    .certificate-paper {
        box-shadow: none !important;
        border: none !important;
        margin: 0 !important;
        width: auto !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
    }

    /* Prevent container helpers from adding page breaks */
    .cert-footer, .cert-dirigido-section {
        page-break-inside: avoid !important;
    }
}
