/* css/style.css */
:root {
    --primary: #5850ec;
    --primary-hover: #4f46e5;
    --primary-light: rgba(88, 80, 236, 0.15);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    
    --dark-bg: #0b0f19;
    --dark-card: #151b2c;
    --dark-border: rgba(255, 255, 255, 0.08);
    --dark-text: #f3f4f6;
    --dark-text-muted: #9ca3af;
    
    --light-bg: #f8fafc;
    --light-card: #ffffff;
    --light-border: rgba(0, 0, 0, 0.06);
    --light-text: #0f172a;
    --light-text-muted: #64748b;
    
    --bg: var(--light-bg);
    --card-bg: var(--light-card);
    --border-color: var(--light-border);
    --text-color: var(--light-text);
    --text-muted: var(--light-text-muted);
    
    --sidebar-width: 280px;
    --header-height: 70px;
    --border-radius: 12px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme {
    --bg: var(--dark-bg);
    --card-bg: var(--dark-card);
    --border-color: var(--dark-border);
    --text-color: var(--dark-text);
    --text-muted: var(--dark-text-muted);
}

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

/* Login Screen */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Cairo', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition);
    z-index: 100;
}

/* Sidebar Colapsada */
.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .role-switcher,
.sidebar.collapsed .user-details {
    display: none !important;
}

.sidebar.collapsed .logo {
    justify-content: center;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-color);
    text-decoration: none;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 12px;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0 12px 8px 12px;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

.nav-link:hover svg {
    color: var(--primary);
}

.nav-link.active {
    background-color: var(--primary);
    color: white;
}

.nav-link.active svg {
    color: white;
}

.nav-link.restricted {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-link.restricted:hover {
    background-color: transparent;
    color: var(--text-color);
}

.nav-link.restricted:hover svg {
    color: var(--text-muted);
}

.lock-badge {
    position: absolute;
    right: 12px;
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    display: none;
    font-weight: 600;
}

.nav-link.restricted .lock-badge {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* Sidebar Footer & User Info */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-switcher {
    display: flex;
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3px;
}

body.light-theme .role-switcher {
    background-color: rgba(0, 0, 0, 0.03);
}

.role-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.role-btn.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Header */
.app-header {
    height: var(--header-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    transition: var(--transition);
}

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

.module-title {
    font-size: 1.25rem;
    font-weight: 700;
}

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

.header-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.header-btn svg {
    width: 20px;
    height: 20px;
}

/* Viewport / Content */
.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    position: relative;
}

/* Glass Cards & Dashboard Elements */
.glass-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.glass-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.grid-cols-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

/* KPI Cards */
.kpi-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-info h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.kpi-info .kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
}

.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon-box.primary { background-color: var(--primary-light); color: var(--primary); }
.kpi-icon-box.success { background-color: var(--success-light); color: var(--success); }
.kpi-icon-box.warning { background-color: var(--warning-light); color: var(--warning); }
.kpi-icon-box.danger { background-color: var(--danger-light); color: var(--danger); }

/* Blocked state overlay */
.blocked-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 400px;
    gap: 20px;
}

.blocked-icon {
    width: 72px;
    height: 72px;
    background-color: var(--danger-light);
    color: var(--danger);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blocked-icon svg {
    width: 36px;
    height: 36px;
}

.blocked-view h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.blocked-view p {
    color: var(--text-muted);
    max-width: 400px;
    font-size: 0.95rem;
}

/* General button */
.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

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

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.org-chart-container {
    position: relative;
    width: 100%;
    height: 65vh;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
}

body.dark-theme .org-chart-container {
    background-color: rgba(255, 255, 255, 0.01);
}

.org-chart-container.dragging {
    cursor: grabbing;
}

.org-chart-inner {
    position: absolute;
    display: inline-block;
    cursor: inherit;
    transform-origin: 0 0;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.org-chart-inner.ready {
    opacity: 1;
}

.org-chart-container.dragging .org-chart-inner {
    transition: none !important;
}

.org-tree {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    position: relative;
    vertical-align: top;
}

.org-level {
    display: inline-flex;
    justify-content: center;
    gap: 40px;
    position: relative;
}

.org-node {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 18px 24px;
    min-width: 240px;
    max-width: 280px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    position: relative;
}

.org-node * {
    pointer-events: none;
}

body.dark-theme .org-node {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.org-node:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px var(--primary-light);
}

.org-node.ceo {
    border: 2px solid var(--primary);
    background-color: var(--primary-light);
}

.org-node .node-puesto {
    font-size: 0.95rem;
    font-weight: 750;
    color: var(--text-color);
    margin-bottom: 6px;
    font-family: 'Cairo', sans-serif;
}

.org-node .node-nombre {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Conectores simples del organigrama */
.org-node::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    width: 2px;
    height: 15px;
    background-color: var(--border-color);
}

.org-node.ceo::before {
    display: none;
}

/* Modal de Perfil de Puesto */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 28px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close-btn:hover {
    background-color: var(--danger-light);
    color: var(--danger);
}

.modal-title-group {
    margin-bottom: 20px;
}

.modal-title-group h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-color);
    font-family: 'Cairo', sans-serif;
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

.modal-body-section {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.modal-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-text-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* Efectos Drag & Drop de Organigrama */
.org-node.drag-over {
    border: 2px dashed var(--primary) !important;
    background-color: var(--primary-light) !important;
    transform: scale(1.05);
}

.org-node[draggable="true"] {
    cursor: grab;
}

.org-node:active {
    cursor: grabbing;
}

/* Legajo Digital UI */
.legajo-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
    gap: 8px;
    overflow-x: auto;
    width: 100%;
}

.legajo-tab-btn {
    background: transparent;
    border: none;
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
}

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

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

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

.legajo-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legajo-label {
    font-size: 0.75rem;
    font-weight: 750;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.legajo-value {
    font-size: 0.95rem;
    color: var(--text-color);
    background-color: rgba(0, 0, 0, 0.02);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

body.dark-theme .legajo-value {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Digital Signature Box */
.signature-box-container {
    border: 1px dashed var(--border-color);
    background-color: rgba(0, 0, 0, 0.01);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-top: 16px;
}

.signature-pad-sim {
    height: 100px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--primary);
    position: relative;
    overflow: hidden;
}

.signature-line-drawn {
    width: 0;
    height: 2px;
    background-color: var(--primary);
    position: absolute;
    bottom: 30px;
    left: 10%;
    transition: width 1.2s ease-in-out;
}

.signature-pad-sim.signed .signature-line-drawn {
    width: 80%;
}

/* ====== Ausentismo y Licencias Module ====== */
.aus-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.aus-kpi-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.aus-kpi-card .aus-kpi-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.aus-kpi-card .aus-kpi-value {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 6px;
    font-family: 'Cairo', sans-serif;
}

.aus-kpi-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 0 0 12px 12px;
}

.aus-kpi-card.assigned::after { background: var(--primary); }
.aus-kpi-card.used::after { background: var(--warning); }
.aus-kpi-card.pending::after { background: var(--success); }
.aus-kpi-card.requested::after { background: #8b5cf6; }

/* Clock-in widget */
.clock-widget {
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    background: linear-gradient(135deg, rgba(59,130,246,0.04), rgba(16,185,129,0.04));
    position: relative;
}

.clock-widget .clock-time {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clock-widget .clock-date {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.clock-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.clock-actions .btn-clock {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
}

.btn-clock.ingreso {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-clock.egreso {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-clock:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-clock:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.clock-status {
    margin-top: 16px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.clock-status.checked-in {
    background-color: var(--success-light);
    color: var(--success);
}

.clock-status.checked-out {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Approval card */
.approval-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    transition: var(--transition);
}

.approval-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

.approval-actions .btn-approve {
    background: var(--success);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.approval-actions .btn-reject {
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.approval-actions .btn-approve:hover,
.approval-actions .btn-reject:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Solicitud form */
.aus-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.aus-form-grid .aus-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aus-form-grid .aus-form-field.full-width {
    grid-column: 1 / -1;
}

.aus-form-field label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.aus-form-field input,
.aus-form-field select,
.aus-form-field textarea {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.02);
    color: var(--text-color);
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
    transition: var(--transition);
}

body.dark-theme .aus-form-field input,
body.dark-theme .aus-form-field select,
body.dark-theme .aus-form-field textarea {
    background-color: rgba(255,255,255,0.05);
}

.aus-form-field input:focus,
.aus-form-field select:focus,
.aus-form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Master dashboard table */
.aus-master-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.aus-master-table thead tr {
    border-bottom: 2px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.aus-master-table th {
    padding: 12px 10px;
    font-weight: 700;
}

.aus-master-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.aus-master-table tbody tr:hover {
    background-color: rgba(59,130,246,0.03);
}

/* Notification toast */
.aus-notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideInUp 0.4s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideInUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ====== Reclutamiento y Selección Module ====== */

/* Kanban Pipeline Board */
.kanban-board {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 400px;
    -webkit-overflow-scrolling: touch;
}

.kanban-board::-webkit-scrollbar {
    height: 6px;
}

.kanban-board::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.kanban-column {
    min-width: 220px;
    max-width: 220px;
    background: rgba(0,0,0,0.02);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
}

body.dark-theme .kanban-column {
    background: rgba(255,255,255,0.03);
}

.kanban-column.drag-over-col {
    background: rgba(59,130,246,0.08);
    border: 2px dashed var(--primary);
}

.kanban-column-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 6px 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-column-header .col-count {
    background: var(--border-color);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-height: 60px;
}

.kanban-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
    cursor: grab;
    transition: var(--transition);
    position: relative;
}

.kanban-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.kanban-card:active {
    cursor: grabbing;
    opacity: 0.8;
}

.kanban-card.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.kanban-card * {
    pointer-events: none;
}

.kanban-card .card-name {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 4px;
}

.kanban-card .card-position {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.kanban-card .card-score {
    display: flex;
    gap: 2px;
    margin-top: 8px;
}

.kanban-card .card-score .star {
    color: #fbbf24;
    font-size: 0.75rem;
}

.kanban-card .card-score .star.empty {
    color: var(--border-color);
}

/* Terminal columns special styling */
.kanban-column.col-ingreso { border-top: 3px solid var(--success); }
.kanban-column.col-no-seleccionado { border-top: 3px solid var(--danger); }
.kanban-column.col-onboarding { border-top: 3px solid #8b5cf6; }
.kanban-column.col-oferta { border-top: 3px solid #f59e0b; }

/* Vacancy cards */
.vacancy-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.vacancy-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.vacancy-card .vacancy-status {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vacancy-card .vacancy-status.abierta { background: var(--success-light); color: var(--success); }
.vacancy-card .vacancy-status.pendiente { background: var(--warning-light); color: var(--warning); }
.vacancy-card .vacancy-status.cerrada { background: rgba(100,100,100,0.1); color: var(--text-muted); }

.vacancy-card .vacancy-title {
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 4px;
    padding-right: 100px;
}

.vacancy-card .vacancy-area {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.vacancy-card .vacancy-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.vacancy-card .vacancy-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Candidate profile card */
.candidate-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: var(--transition);
}

.candidate-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.candidate-card .cand-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.candidate-card .cand-info {
    flex: 1;
}

.candidate-card .cand-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.candidate-card .cand-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.candidate-card .cand-pipeline-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(59,130,246,0.1);
    color: var(--primary);
    white-space: nowrap;
}

/* Star rating interactive */
.star-rating {
    display: inline-flex;
    gap: 2px;
    cursor: pointer;
}

.star-rating .star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--border-color);
    transition: color 0.15s;
    padding: 0 1px;
    pointer-events: auto;
}

.star-rating .star-btn.filled {
    color: #fbbf24;
}

.star-rating .star-btn:hover {
    color: #f59e0b;
}

/* KPI large card */
.rec-kpi-card {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.rec-kpi-card .rec-kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.rec-kpi-card .rec-kpi-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 6px;
    font-family: 'Cairo', sans-serif;
}

.rec-kpi-card .rec-kpi-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.rec-kpi-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.rec-kpi-card.kpi-blue::after { background: var(--primary); }
.rec-kpi-card.kpi-green::after { background: var(--success); }
.rec-kpi-card.kpi-yellow::after { background: #f59e0b; }
.rec-kpi-card.kpi-purple::after { background: #8b5cf6; }
.rec-kpi-card.kpi-red::after { background: var(--danger); }

/* ====== Responsive Mobile Adaptations ====== */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }
    
    .sidebar.collapsed {
        display: none;
    }
    
    .sidebar-header {
        padding: 15px 20px;
    }
    
    .sidebar-nav {
        padding: 10px 15px;
        max-height: 280px;
    }
    
    .sidebar-footer {
        padding: 15px 20px;
        border-top: 1px solid var(--border-color);
    }
    
    .main-wrapper {
        width: 100%;
        height: calc(100vh - var(--sidebar-height));
    }
    
    .content-body {
        padding: 16px;
    }
    
    .grid-cols-4, .grid-cols-3, .grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .glass-card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .kpi-card {
        padding: 16px;
    }
    
    /* Adaptar formularios para evitar desbordes */
    .aus-form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .aus-master-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .login-box {
        margin: 16px;
        padding: 24px;
    }
}
