/**
 * Cosecha App Styles
 * Estilos para la aplicacion de registro de cosecha
 */

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

body {
    background: linear-gradient(135deg, #0a0a15 0%, #1a1a2e 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(0, 170, 255, 0.2);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header h1 {
    font-size: 18px;
    color: #00aaff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 span {
    font-size: 24px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.back-btn, .action-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.back-btn:hover, .action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn.primary {
    background: linear-gradient(90deg, #00aaff, #00ffaa);
    border: none;
    color: #000;
    font-weight: bold;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 170, 255, 0.4);
}

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

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card.highlight {
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.05);
}

.stat-card.clickable {
    cursor: pointer;
    transition: all 0.3s;
}

.stat-card.clickable:hover {
    transform: scale(1.02);
    border-color: rgba(0, 255, 136, 0.5);
}

/* Animacion de transicion a total general */
.stat-card .stat-value,
.stat-card .stat-label {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card.animating .stat-value,
.stat-card.animating .stat-label {
    transform: scale(0) rotateX(90deg);
    opacity: 0;
}

.stat-card.showing-general {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.2), rgba(138, 43, 226, 0.15));
    border-color: rgba(0, 170, 255, 0.6);
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3), inset 0 0 30px rgba(0, 170, 255, 0.1);
    animation: glowPulse 2s ease-in-out infinite;
}

.stat-card.showing-general::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.stat-card.showing-general .stat-value {
    color: #00aaff;
    text-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

.stat-card.showing-general .stat-label {
    color: rgba(0, 170, 255, 0.8);
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 170, 255, 0.3), inset 0 0 30px rgba(0, 170, 255, 0.1);
    }
    50% {
        box-shadow: 0 0 35px rgba(0, 170, 255, 0.5), inset 0 0 40px rgba(0, 170, 255, 0.15);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.stat-card.pending {
    border-color: rgba(255, 170, 0, 0.3);
    background: rgba(255, 170, 0, 0.05);
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #00ff88;
}

.stat-card.pending .stat-value {
    color: #ffaa00;
}

.stat-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Selection Mode Stats */
.stat-card.showing-selection {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(255, 105, 180, 0.15));
    border-color: rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3);
}

.stat-card.showing-selection .stat-value {
    color: #da70d6;
}

.stat-card.showing-selection .stat-label {
    color: rgba(218, 112, 214, 0.8);
}

/* Clear Selection Button */
.clear-selection-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: rgba(255, 100, 100, 0.2);
    border: 1px solid rgba(255, 100, 100, 0.4);
    border-radius: 8px;
    color: #ff6666;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-selection-btn:hover {
    background: rgba(255, 100, 100, 0.3);
}

/* Selection Actions */
.selection-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.selection-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    min-width: 100px;
}

.selection-btn.clear {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6666;
    border: 1px solid rgba(255, 100, 100, 0.4);
}

.selection-btn.clear:hover {
    background: rgba(255, 100, 100, 0.3);
}

.selection-btn.pending {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    border: 1px solid rgba(255, 170, 0, 0.4);
}

.selection-btn.pending:hover {
    background: rgba(255, 170, 0, 0.3);
}

.selection-btn.paid {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.4);
}

.selection-btn.paid:hover {
    background: rgba(0, 255, 136, 0.3);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
}

.tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: #00aaff;
    border-bottom-color: #00aaff;
}

/* Section */
.section {
    display: none;
}

.section.active {
    display: block;
}

/* Jobs Grid */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.job-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.job-card:hover {
    border-color: rgba(0, 170, 255, 0.5);
    transform: translateY(-2px);
}

.job-card.active {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.05);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.job-title {
    font-size: 16px;
    font-weight: 600;
}

.job-status {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.job-status.inactive {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.job-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.job-details span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.job-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #00aaff;
}

.job-stat-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
}

/* Calendar */
.calendar-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.calendar-nav {
    display: flex;
    gap: 10px;
    align-items: center;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-nav button:hover {
    background: rgba(0, 170, 255, 0.3);
}

.calendar-month {
    font-size: 18px;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
}

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

.calendar-day-header {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    padding: 8px 5px;
    text-transform: uppercase;
}

.calendar-day {
    min-height: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-day:hover {
    background: rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.3);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
}

.calendar-day.has-entries {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

.calendar-day.has-pending {
    background: rgba(255, 170, 0, 0.1);
    border-color: rgba(255, 170, 0, 0.3);
}

/* Weekend Styling - MAS CLARO */
.calendar-day-header.sunday {
    color: #ff8888;
    font-weight: 600;
}

.calendar-day-header.saturday {
    color: #88aaff;
    font-weight: 600;
}

.calendar-day.sunday {
    background: rgba(255, 200, 200, 0.25);
    border-color: rgba(255, 150, 150, 0.4);
}

.calendar-day.sunday .day-number {
    color: #ffaaaa;
}

.calendar-day.saturday {
    background: rgba(200, 220, 255, 0.18);
    border-color: rgba(150, 180, 255, 0.35);
}

.calendar-day.saturday .day-number {
    color: #aaccff;
}

.calendar-day.sunday:hover,
.calendar-day.saturday:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Weekend with entries */
.calendar-day.sunday.has-entries,
.calendar-day.saturday.has-entries {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
}

.calendar-day.sunday.has-pending,
.calendar-day.saturday.has-pending {
    background: rgba(255, 170, 0, 0.2);
    border-color: rgba(255, 170, 0, 0.5);
}

/* Selected days */
.calendar-day.selected {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.4), rgba(255, 105, 180, 0.3)) !important;
    border-color: rgba(138, 43, 226, 0.8) !important;
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.5), inset 0 0 15px rgba(138, 43, 226, 0.2);
    animation: selectedPulse 1.5s ease-in-out infinite;
}

.calendar-day.selected .day-number {
    color: #fff;
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.8);
}

.calendar-day.selected .day-amount {
    color: #da70d6;
}

@keyframes selectedPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(138, 43, 226, 0.5), inset 0 0 15px rgba(138, 43, 226, 0.2); }
    50% { box-shadow: 0 0 20px rgba(138, 43, 226, 0.7), inset 0 0 20px rgba(138, 43, 226, 0.3); }
}

.day-number {
    font-size: 16px;
    font-weight: 700;
}

.day-entries-count {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.day-amount {
    font-size: 13px;
    font-weight: 600;
    color: #00ff88;
}

.day-notes {
    font-size: 10px;
    color: #ffcc00;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: auto;
}

/* ==========================================
   Activity Calendar (GitHub-style)
   ========================================== */
.activity-calendar {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.ac-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}
.ac-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}
.ac-legend {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
}
.ac-legend-label { margin: 0 4px; }
.ac-legend-box {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    background: rgba(255,255,255,0.06);
}
.ac-legend-sep {
    width: 6px;
}
.ac-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.ac-scroll::-webkit-scrollbar { height: 5px; }
.ac-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
.ac-labels {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-right: 4px;
    flex-shrink: 0;
    padding-top: 18px;
}
.ac-labels span {
    height: 13px;
    font-size: 9px;
    color: rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    line-height: 1;
}
.ac-graph-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ac-months {
    display: flex;
    height: 18px;
    align-items: flex-end;
    position: relative;
}
.ac-month-label {
    font-size: 10px;
    color: rgba(255,255,255,0.45);
    position: absolute;
    bottom: 2px;
    white-space: nowrap;
}
.ac-graph {
    display: flex;
    gap: 2px;
}
.ac-week {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ac-day {
    width: 13px;
    height: 13px;
    border-radius: 2px;
    background: rgba(255,255,255,0.06);
    cursor: pointer;
    transition: transform 0.12s;
    box-sizing: border-box;
}
.ac-day:hover {
    transform: scale(1.3);
    z-index: 2;
    filter: brightness(1.3);
}
.ac-day.ac-today {
    box-shadow: 0 0 0 2px #00aaff;
}
/* Tooltip */
.ac-tooltip {
    position: fixed;
    background: rgba(10,10,21,0.95);
    border: 1px solid rgba(0,170,255,0.4);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 11px;
    color: #fff;
    pointer-events: none;
    z-index: 3000;
    white-space: nowrap;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.ac-tooltip.visible { display: block; }
.ac-tooltip-amount { color: #00ff88; font-weight: 600; }
.ac-tooltip-pending { color: #ffaa00; }
.ac-tooltip-date { color: rgba(255,255,255,0.5); margin-top: 2px; }

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group select {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    min-width: 160px;
}

.filter-group select:focus {
    outline: none;
    border-color: #00aaff;
}

.filter-group select option {
    background: #1a1a2e;
}

.filter-buttons {
    display: flex;
    gap: 5px;
}

.filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.filter-btn.active {
    background: rgba(0, 170, 255, 0.2);
    border-color: #00aaff;
    color: #00aaff;
}

/* Month Separator */
.month-separator {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0 15px 0;
    padding: 0;
}

.month-separator:first-child {
    margin-top: 0;
}

.month-separator-title {
    font-size: 14px;
    font-weight: 700;
    color: #00aaff;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.month-separator-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 170, 255, 0.5), transparent);
}

.month-separator-stats {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.month-separator-stats .total {
    color: #00ff88;
    font-weight: 600;
}

/* Entries List */
.entries-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.entry-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    transition: all 0.3s;
    cursor: pointer;
}

.entry-card:hover {
    border-color: rgba(0, 170, 255, 0.3);
}

/* Selected entry */
.entry-card.selected {
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.2), rgba(255, 105, 180, 0.15));
    border-color: rgba(138, 43, 226, 0.6);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.entry-card.selected .entry-date {
    color: #da70d6;
}

.entry-info {
    flex: 1;
    min-width: 200px;
}

.entry-date {
    font-size: 14px;
    font-weight: 600;
    color: #00aaff;
    margin-bottom: 4px;
}

.entry-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

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

.entry-total {
    font-size: 20px;
    font-weight: bold;
    color: #00ff88;
}

.entry-status {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 4px;
}

.entry-status.paid {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.entry-status.pending {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}

/* Icon Button */
.icon-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: rgba(0, 170, 255, 0.3);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: linear-gradient(135deg, #0a0a15 0%, #1a1a2e 100%);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #0a0a15 0%, #1a1a2e 100%);
    z-index: 1;
}

.modal-header h2 {
    font-size: 18px;
    color: #00aaff;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
}

.modal-close:hover {
    color: #ff4466;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Form */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00aaff;
}

.form-group select option {
    background: #1a1a2e;
}

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

/* Work Type Selector */
.work-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.work-type-option {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.work-type-option:hover {
    border-color: rgba(0, 170, 255, 0.3);
}

.work-type-option.selected {
    border-color: #00aaff;
    background: rgba(0, 170, 255, 0.1);
}

.work-type-option .icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.work-type-option .label {
    font-size: 13px;
    font-weight: 600;
}

/* Conditional Fields */
.conditional-fields {
    display: none;
    margin-top: 15px;
}

.conditional-fields.visible {
    display: block;
}

/* Input with button */
.input-with-btn {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-with-btn select {
    flex: 1;
}

.btn-edit {
    padding: 10px 15px;
    background: rgba(255, 170, 0, 0.2);
    border: 1px solid rgba(255, 170, 0, 0.4);
    border-radius: 8px;
    color: #ffaa00;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-edit:hover {
    background: rgba(255, 170, 0, 0.3);
}

/* Job selected display */
.job-selected-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 10px;
}

.job-selected-name {
    flex: 1;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.btn-change {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-change:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Config Section */
.config-section {
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.config-header {
    font-size: 14px;
    font-weight: 600;
    color: #00aaff;
    margin-bottom: 15px;
    text-align: center;
}

/* Toggle */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.toggle-switch {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-switch.active {
    background: rgba(0, 255, 136, 0.3);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.toggle-switch.active::after {
    left: 26px;
    background: #00ff88;
}

/* Calculated Total */
.calculated-total {
    font-size: 32px;
    font-weight: bold;
    color: #00ff88;
    text-align: center;
    padding: 20px;
    background: rgba(0, 255, 136, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-primary {
    background: linear-gradient(90deg, #00aaff, #00ffaa);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 170, 255, 0.4);
}

.btn-danger {
    background: rgba(255, 68, 102, 0.2);
    color: #ff4466;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.4);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state h3 {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

/* Quick Add */
.quick-add-bar {
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}

.quick-add-bar.visible {
    display: block;
}

.quick-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.quick-add-title {
    font-size: 14px;
    font-weight: 600;
}

.quick-add-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 18px;
}

.quick-add-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.quick-add-form .form-group {
    margin: 0;
    flex: 1;
    min-width: 120px;
}

.quick-add-form .form-group label {
    font-size: 10px;
}

.quick-add-form input {
    padding: 10px;
}

/* Confirm Modal */
.confirm-message {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    white-space: pre-line;
}

.confirm-message .confirm-summary {
    margin-top: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
}

.confirm-message .confirm-summary .confirm-fruit-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.confirm-message .confirm-summary .confirm-fruit-line:last-child {
    border-bottom: none;
}

.confirm-message .confirm-totals {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 255, 136, 0.3);
    font-weight: 600;
    color: #00ff88;
    font-size: 15px;
    text-align: center;
}

.confirm-message .confirm-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: rgba(0, 255, 136, 0.9);
    color: #000;
    border-radius: 8px;
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
}

.toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background: rgba(255, 68, 102, 0.9);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 12px 15px;
    }

    .header h1 {
        font-size: 14px;
    }

    .container {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .calendar-day {
        min-height: 65px;
    }

    .day-number {
        font-size: 14px;
    }

    .day-amount {
        font-size: 11px;
    }

    .day-notes {
        font-size: 9px;
    }

    .day-entries-count {
        font-size: 9px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .entry-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .entry-amount {
        text-align: left;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .ac-day { width: 10px; height: 10px; }
    .ac-labels span { height: 10px; font-size: 8px; }
    .ac-graph { gap: 2px; }
    .ac-week { gap: 2px; }
    .activity-calendar { padding: 10px; }
    .ac-legend { display: none; }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day {
        min-height: 55px;
        border-radius: 4px;
        padding: 4px;
    }

    .calendar-day-header {
        font-size: 9px;
        padding: 5px 2px;
    }

    .day-notes {
        display: none;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .stat-value {
        font-size: 18px;
    }

    .stat-label {
        font-size: 8px;
    }

    .user-menu-container {
        order: 2;
    }

    .user-dropdown {
        width: 260px;
        right: -10px;
    }
}

/* Scroll lock when modals are open */
body.modal-open {
    overflow: hidden;
}

/* User Profile Dropdown */
.user-menu-container {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 170, 255, 0.5);
    background: linear-gradient(135deg, #1a1a3e, #2a2a4e);
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    transition: all 0.3s;
    position: relative;
}

.user-avatar-btn:hover {
    border-color: #00aaff;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.4);
    transform: scale(1.08);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    font-weight: 700;
    color: #00aaff;
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.15), rgba(0, 255, 136, 0.1));
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: linear-gradient(135deg, #0d0d1f 0%, #1a1a35 100%);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 170, 255, 0.1);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.user-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: rgba(0, 170, 255, 0.05);
}

.user-dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(0, 170, 255, 0.4);
    background: linear-gradient(135deg, #1a1a3e, #2a2a4e);
}

.user-dropdown-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 18px;
    font-weight: 700;
    color: #00aaff;
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.15), rgba(0, 255, 136, 0.1));
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}

.user-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-email {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.dropdown-item-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    flex: 1;
}

/* Boss Mode Toggle */
.boss-mode-item {
    justify-content: flex-start;
}

.boss-mode-toggle {
    margin-left: auto;
}

.boss-mode-toggle-track {
    width: 42px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.boss-mode-toggle.active .boss-mode-toggle-track {
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.4), rgba(255, 215, 0, 0.3));
    border-color: rgba(255, 170, 0, 0.6);
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.3);
}

.boss-mode-toggle-thumb {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.boss-mode-toggle.active .boss-mode-toggle-thumb {
    left: 20px;
    background: #ffaa00;
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

/* Logout item */
.logout-item:hover {
    background: rgba(255, 68, 102, 0.1) !important;
}

.logout-item .dropdown-item-label {
    color: #ff6666;
}

/* Boss Mode active state on body */
body.boss-mode .header {
    border-bottom-color: rgba(255, 170, 0, 0.4);
}

body.boss-mode .header h1 {
    color: #ffaa00;
}

body.boss-mode .user-avatar-btn {
    border-color: rgba(255, 170, 0, 0.6);
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.3);
}

body.boss-mode .user-avatar-initials {
    color: #ffaa00;
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 215, 0, 0.1));
}

body.boss-mode .tab.active[data-tab="cuadrilla"] {
    color: #ffaa00;
    border-bottom-color: #ffaa00;
}

/* Boss-only tab hidden by default */
.boss-only-tab {
    display: none !important;
}

body.boss-mode .boss-only-tab {
    display: block !important;
}

/* Welcome Modal Styles */
.welcome-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.5;
}

.username-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username-input-row input {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-family: monospace;
}

.username-input-row input:focus {
    outline: none;
    border-color: #00aaff;
}

.username-status {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s;
}

.username-hint.success ~ .username-status,
.username-input-row:has(~ .username-hint.success) .username-status {
    color: #00ff88;
}

.username-hint.error ~ .username-status,
.username-input-row:has(~ .username-hint.error) .username-status {
    color: #ff4466;
}

.username-hint, .rut-hint {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 6px;
    line-height: 1.4;
}

.username-hint.error {
    color: #ff4466;
}

.username-hint.success {
    color: #00ff88;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 21, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 900;
}

.loading-overlay.visible {
    display: flex;
}

.loading-overlay p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    letter-spacing: 1px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 170, 255, 0.2);
    border-top-color: #00aaff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   CUADRILLA - Subtabs, Cards, FAB, Modals
   ========================================== */

/* Subtabs */
.subtabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 170, 0, 0.2);
    overflow-x: auto;
}

.subtab {
    padding: 10px 18px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.subtab.active {
    color: #ffaa00;
    border-bottom-color: #ffaa00;
}

/* Subsections */
.subsection {
    display: none;
    position: relative;
    padding-bottom: 80px;
}

.subsection.active {
    display: block;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffaa00, #ffdd44);
    border: none;
    color: #000;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(255, 170, 0, 0.45);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 170, 0, 0.6);
}

.fab:active {
    transform: scale(0.96);
}

/* Worker Card */
.worker-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.worker-card:hover {
    border-color: rgba(255, 170, 0, 0.45);
    transform: translateY(-2px);
}

.worker-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.worker-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.worker-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.worker-username {
    font-size: 12px;
    color: #00aaff;
    font-family: monospace;
}

.worker-rut {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.worker-last-worked {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

/* Badges */
.worker-badge {
    font-size: 10px;
    padding: 4px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
}

.worker-badge.linked {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.worker-badge.small {
    font-size: 9px;
    padding: 2px 7px;
}

/* Squad Card */
.squad-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.squad-card:hover {
    border-color: rgba(255, 170, 0, 0.45);
    transform: translateY(-2px);
}

.squad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.squad-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.squad-member-count {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 10px;
    background: rgba(255, 170, 0, 0.15);
    color: #ffaa00;
    white-space: nowrap;
}

.squad-last-used {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Worker Mode Selector (inside modal) */
.worker-mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.worker-mode-option {
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.worker-mode-option:hover {
    border-color: rgba(255, 170, 0, 0.3);
}

.worker-mode-option.selected {
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.08);
}

.worker-mode-option .icon {
    font-size: 22px;
    margin-bottom: 5px;
}

.worker-mode-option .label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

/* Worker search result */
.worker-search-status {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    padding: 12px;
    text-align: center;
}

.worker-search-status.empty {
    color: rgba(255, 100, 100, 0.8);
}

.worker-found-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 255, 136, 0.07);
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-radius: 10px;
    margin-top: 8px;
}

.worker-found-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(0, 170, 255, 0.4);
}

.worker-found-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.2), rgba(0, 255, 136, 0.15));
    border: 2px solid rgba(0, 170, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #00aaff;
    flex-shrink: 0;
}

.worker-found-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.worker-found-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.worker-found-username {
    font-size: 12px;
    color: #00aaff;
    font-family: monospace;
}

/* Squad members list in modal */
.squad-members-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 40px;
}

.squad-no-members {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    padding: 10px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.squad-member-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.squad-member-name {
    flex: 1;
    font-size: 14px;
    color: #fff;
}

.squad-member-remove {
    background: none;
    border: none;
    color: rgba(255, 100, 100, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.squad-member-remove:hover {
    color: #ff4466;
}

/* Squad member search results */
.squad-member-results {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.squad-member-results::-webkit-scrollbar {
    width: 4px;
}

.squad-member-results::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.squad-member-result {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.squad-member-result:hover {
    background: rgba(255, 170, 0, 0.08);
    border-color: rgba(255, 170, 0, 0.25);
}

.btn-add-member {
    background: rgba(255, 170, 0, 0.15);
    border: 1px solid rgba(255, 170, 0, 0.35);
    border-radius: 6px;
    color: #ffaa00;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 9px;
    line-height: 1.4;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-add-member:hover {
    background: rgba(255, 170, 0, 0.25);
}

/* Boss mode accent for cuadrilla modals */
body.boss-mode .modal-header h2 {
    /* keep default blue; override only in cuadrilla context via class if needed */
}

/* ==========================================
   BOSS ENTRY MODAL - Step Wizard
   ========================================== */

.boss-entry-modal {
    max-width: 560px;
}

.boss-steps-bar {
    display: flex;
    gap: 4px;
    padding: 0 20px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.boss-step-indicator {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.boss-step-indicator span {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 700;
    margin-right: 5px;
    vertical-align: middle;
}

.boss-step-indicator.active {
    color: #ffaa00;
    border-bottom-color: #ffaa00;
}

.boss-step-indicator.active span {
    background: rgba(255, 170, 0, 0.25);
    color: #ffaa00;
}

.boss-step-indicator.completed {
    color: #00ff88;
}

.boss-step-indicator.completed span {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.boss-step {
    display: none;
}

.boss-step.active {
    display: block;
}

/* Members checklist */
.boss-members-checklist {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.boss-member-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.boss-member-check:hover {
    background: rgba(255, 170, 0, 0.06);
    border-color: rgba(255, 170, 0, 0.2);
}

.boss-member-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ffaa00;
    flex-shrink: 0;
}

.boss-member-check .boss-member-name {
    flex: 1;
    font-size: 14px;
    color: #fff;
}

.boss-member-check.small {
    padding: 6px 10px;
}

.boss-member-check.small .boss-member-name {
    font-size: 13px;
}

/* Amounts table */
.boss-amounts-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.boss-amount-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.boss-amount-name {
    flex: 1;
    font-size: 14px;
    color: #fff;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.boss-amount-input {
    width: 80px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    flex-shrink: 0;
}

.boss-amount-input:focus {
    outline: none;
    border-color: #ffaa00;
}

.boss-amount-value {
    font-size: 14px;
    font-weight: 600;
    color: #00ff88;
    min-width: 60px;
    text-align: right;
    flex-shrink: 0;
}

.boss-amounts-total {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #00ff88;
    text-align: center;
}

/* Bins segments */
.boss-segment {
    margin-bottom: 12px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 170, 0, 0.2);
    border-radius: 10px;
}

.boss-segment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.boss-segment-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffaa00;
}

.boss-segment-remove {
    background: none;
    border: none;
    color: rgba(255, 100, 100, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.boss-segment-remove:hover {
    color: #ff4466;
}

.boss-segment-members-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.boss-segment-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 10px;
}

.boss-segment-bins-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boss-segment-bins-row label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.boss-segment-bins-input {
    flex: 1;
    max-width: 120px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    text-align: center;
}

.boss-segment-bins-input:focus {
    outline: none;
    border-color: #ffaa00;
}

.boss-add-segment-btn {
    width: 100%;
    margin-bottom: 10px;
    border-style: dashed !important;
    border-color: rgba(255, 170, 0, 0.35) !important;
    color: #ffaa00 !important;
}

/* Bins summary */
.boss-bins-summary {
    margin-top: 10px;
}

.boss-summary-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.boss-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    margin-bottom: 3px;
    font-size: 13px;
}

.boss-summary-row span:first-child {
    color: rgba(255, 255, 255, 0.8);
}

.boss-summary-row span:last-child {
    color: #00ff88;
    font-weight: 600;
}

/* Boss calendar day alert icon */
.day-alert-icon {
    font-size: 11px;
    display: block;
    text-align: center;
    line-height: 1;
}

/* ============================================
   WORKER INTEGRATION STYLES
   ============================================ */

/* Notification badge on avatar */
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ff4466;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(255, 68, 102, 0.6);
    animation: notifPulse 2s infinite;
}

@keyframes notifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification list in dropdown */
.notif-header-item {
    cursor: default !important;
}
.notif-header-item:hover {
    background: transparent !important;
}

.notif-list-container {
    max-height: 200px;
    overflow-y: auto;
    padding: 0;
}

.notif-empty {
    text-align: center;
    padding: 16px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}

.notif-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.notif-item:hover {
    background: rgba(0, 170, 255, 0.1);
}

.notif-item.unread {
    background: rgba(0, 170, 255, 0.05);
    border-left: 3px solid #00aaff;
}

.notif-text {
    font-size: 12px;
    color: rgba(255,255,255,0.85);
    line-height: 1.3;
}

.notif-time {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    margin-top: 3px;
}

/* Boss record badge */
.boss-record-badge {
    display: inline-block;
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 8px;
    margin-top: 4px;
    font-weight: 600;
}

/* Boss record card styling */
.entry-card.boss-record {
    border-color: rgba(255, 170, 0, 0.3);
    flex-wrap: wrap;
}

.entry-card.boss-record:hover {
    border-color: rgba(255, 170, 0, 0.5);
}

/* Boss record actions */
.boss-record-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-wrap: wrap;
    align-items: center;
}

.difference-note {
    font-size: 12px;
    color: rgba(255, 170, 0, 0.8);
    font-style: italic;
}

/* Small buttons */
.btn-sm {
    padding: 5px 12px;
    font-size: 11px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-accept {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}
.btn-accept:hover {
    background: rgba(0, 255, 136, 0.35);
}

.btn-difference {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}
.btn-difference:hover {
    background: rgba(255, 170, 0, 0.35);
}

.btn-confirm {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}
.btn-confirm:hover {
    background: rgba(0, 255, 136, 0.35);
}

.btn-pay {
    background: rgba(0, 170, 255, 0.2);
    color: #00aaff;
}
.btn-pay:hover {
    background: rgba(0, 170, 255, 0.35);
}

.btn-share {
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 5px 8px;
}
.btn-share:hover {
    background: rgba(255,255,255,0.2);
}

/* Payment status badges */
.payment-badge {
    display: inline-block;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 8px;
    margin-top: 4px;
    font-weight: 600;
}

.payment-badge.completed {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.payment-badge.boss-confirmed {
    background: rgba(255, 200, 0, 0.2);
    color: #ffc800;
}

.payment-badge.boss-confirmed.blink {
    animation: payBlink 1.5s infinite;
}

@keyframes payBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.payment-badge.worker-confirmed {
    background: rgba(0, 170, 255, 0.2);
    color: #00aaff;
}

.payment-badge.accepted {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.payment-badge.difference {
    background: rgba(255, 68, 102, 0.2);
    color: #ff4466;
}

.payment-badge.pending-pay {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}

/* Grouped card (own + boss) */
.entry-card-grouped {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    margin-bottom: 6px;
}

/* Boss record card spacing */
.entry-card.boss-record {
    border-left: 3px solid #ffaa00;
    flex-wrap: wrap;
}

.entry-card-grouped:hover {
    border-color: rgba(138, 43, 226, 0.5);
}

.grouped-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.grouped-badge {
    display: inline-block;
    background: rgba(138, 43, 226, 0.2);
    color: #da70d6;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 8px;
    margin-top: 4px;
    font-weight: 600;
}

.grouped-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 4px;
}

.entry-card-grouped.expanded .grouped-toggle {
    transform: rotate(180deg);
}

.grouped-body {
    display: none;
    padding: 0 15px 12px;
}

.entry-card-grouped.expanded .grouped-body {
    display: block;
}

.grouped-comparison {
    display: flex;
    gap: 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.grouped-side {
    flex: 1;
    padding: 10px 12px;
    text-align: center;
}

.own-side {
    background: rgba(0, 170, 255, 0.05);
}

.boss-side {
    background: rgba(255, 170, 0, 0.05);
}

.grouped-divider {
    width: 1px;
    background: rgba(255,255,255,0.1);
}

.grouped-side-label {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
    font-weight: 600;
}

.grouped-side-qty {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2px;
}

.grouped-side-total {
    font-size: 16px;
    font-weight: bold;
    color: #00ff88;
}

/* Boss day modal - member breakdown */
.boss-day-members {
    margin: 4px 0 12px;
    padding: 0;
}

.boss-day-member-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.boss-day-member-row:last-child {
    border-bottom: none;
}

.boss-day-member-row .member-name {
    flex: 1;
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

.boss-day-member-row .member-total {
    font-size: 14px;
    font-weight: 600;
    color: #00ff88;
    min-width: 60px;
    text-align: right;
}

.boss-day-member-row .member-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Boss day entry card in modal */
.boss-day-entry {
    margin-bottom: 4px;
    border-bottom: none;
}

/* Public link row */
.public-link-row {
    display: flex;
    gap: 8px;
}

.public-link-row input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
}

.public-link-row .btn {
    white-space: nowrap;
}

/* Entries list gap for mixed records */
.entries-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
