:root {
    --primary-color: #E91E63;
    --primary-dark: #C2185B;
    --primary-light: #F48FB1;
    --secondary-color: #000000;
    --background: #0A0A0A;
    --surface: #1A1A1A;
    --surface-light: #2A2A2A;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --success: #4CAF50;
    --error: #F44336;
    --warning: #FF9800;
    --border-color: #333333;
    --shadow: rgba(233, 30, 99, 0.2);
    --name-col-width: 180px;
    --hours-col-width: 96px;
    --day-col-width: 68px;
}

/* Light Theme */
[data-theme="light"] {
    --primary-color: #E91E63;
    --primary-dark: #C2185B;
    --primary-light: #F48FB1;
    --secondary-color: #FFFFFF;
    --background: #F5F5F5;
    --surface: #FFFFFF;
    --surface-light: #F9F9F9;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --success: #4CAF50;
    --error: #F44336;
    --warning: #FF9800;
    --border-color: #E0E0E0;
    --shadow: rgba(233, 30, 99, 0.1);
}

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

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

.app-container {
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--background) 0%, #0F0F0F 100%);
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(26, 26, 26, 0.95);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.logo {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Tabs Navigation */
.tabs {
    display: flex;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1rem;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

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

.tab-btn:active {
    transform: scale(0.95);
}

.tab-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Content */
.tab-content {
    display: none;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

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

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

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}

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

.btn-primary svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Store Buttons */
.store-buttons-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.store-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-btn:hover {
    border-color: var(--primary-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow);
}

.store-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 20px var(--shadow);
}

.store-btn-icon {
    font-size: 1.5rem;
}

.store-btn-text {
    font-weight: 600;
}

.store-summary-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.25rem;
    border-radius: 16px;
    font-weight: 600;
    white-space: nowrap;
}

/* Hours Norm Card */
.hours-norm-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.hours-norm-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hours-norm-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.hours-norm-label svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    color: var(--primary-color);
}

.hours-norm-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hours-norm-input {
    width: 100px;
    padding: 0.75rem 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
    font-family: inherit;
}

.hours-norm-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--shadow);
}

.hours-norm-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Schedule Content */
.schedule-content {
    display: none;
}

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

/* Month Selector */
.month-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.month-nav-btn {
    background: var(--surface-light);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.month-nav-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.month-nav-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.month-display {
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    flex: 1;
    padding: 0 1rem;
    color: var(--text-primary);
}

/* Schedule Table */
.schedule-table-container {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
}

.schedule-table-container,
.all-stores-table-wrapper {
    background: var(--surface);
}

.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 640px;
    font-size: 0.85rem;
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    background: var(--surface);
}

.schedule-table thead {
    background: var(--surface-light);
    position: sticky;
    top: 0;
    z-index: 10;
}

.schedule-table th {
    padding: 0.8rem 0.6rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    background-color: var(--surface-light);
    background-image: none;
    background-clip: border-box;
}

.schedule-table td {
    background-color: var(--surface);
    background-clip: border-box;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top: 0;
    border-bottom: 0;
}

.schedule-table,
.schedule-table thead,
.schedule-table tbody,
.schedule-table tbody tr {
    background-color: var(--surface);
}

.schedule-table td.employee-name-cell,
.schedule-table td.month-hours-cell {
    background: var(--surface);
}

.schedule-table th.employee-col {
    text-align: left;
    padding-left: 1.2rem;
    min-width: var(--name-col-width);
    width: var(--name-col-width);
    position: sticky;
    left: 0;
    background: var(--surface-light);
    background-clip: border-box;
    z-index: 12;
    box-shadow: none;
}

.schedule-table th.hours-col {
    min-width: var(--hours-col-width);
    width: var(--hours-col-width);
    position: sticky;
    left: var(--name-col-width);
    background: var(--surface-light);
    background-clip: border-box;
    z-index: 12;
    border-right: 1px solid var(--border-color);
    box-shadow: none;
}

.day-header {
    min-width: var(--day-col-width);
    width: var(--day-col-width);
}

.day-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.day-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.day-number {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.schedule-table tbody tr {
    transition: background 0.2s ease;
}

.schedule-table tbody tr:last-child td {
    border-bottom: 0;
}

.schedule-table tbody tr,
.schedule-table tbody tr td {
    border-top: 0;
    border-bottom: 0;
}

.schedule-table tbody tr:hover td {
    background-color: #242424;
    box-shadow: none;
}

.schedule-table th,
.schedule-table td {
    box-shadow: none;
}

.employee-name-cell {
    position: sticky;
    left: 0;
    background-color: var(--surface);
    background-clip: border-box;
    z-index: 5;
    padding: 0.8rem 1.2rem;
    width: var(--name-col-width);
    border-right: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease;
    box-shadow: none;
}

.employee-name-cell:hover {
    background-color: #2a2a2a;
}

.month-hours-cell {
    position: sticky;
    left: var(--name-col-width);
    background-color: var(--surface);
    background-clip: border-box;
    z-index: 5;
    padding: 0.8rem;
    width: var(--hours-col-width);
    text-align: center;
    border-right: 1px solid var(--border-color);
    box-shadow: none;
}

.employee-name-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

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

.employee-position {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.month-hours {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.1) 0%, rgba(233, 30, 99, 0.05) 100%);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    display: inline-block;
}

.month-hours.norm-ok {
    color: var(--success);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%);
}

.month-hours.norm-low {
    color: var(--warning);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 152, 0, 0.05) 100%);
}

.day-cell {
    padding: 0.6rem 0.4rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: var(--day-col-width);
    width: var(--day-col-width);
    vertical-align: middle;
    position: relative;
    word-break: break-word;
    background-clip: padding-box;
    background-color: var(--surface);
}

.day-cell.selected {
    background-color: #3a1a27;
    background-image: linear-gradient(135deg, rgba(233, 30, 99, 0.35) 0%, rgba(233, 30, 99, 0.12) 100%);
    box-shadow: inset 0 0 0 1px rgba(233, 30, 99, 0.35), 0 8px 18px rgba(233, 30, 99, 0.15);
}

.day-cell.empty {
    background: var(--surface);
}

.day-cell.empty:hover {
    background: var(--surface-light);
}

.day-cell.working {
    background-color: #2b111b;
    background-image: linear-gradient(135deg, #3b1524 0%, #2b111b 100%);
    border-left: 3px solid var(--primary-color);
}

.day-cell.working:hover {
    background-color: #351623;
    background-image: linear-gradient(135deg, #4a1b2f 0%, #351623 100%);
    transform: scale(1.02);
}

.day-schedule-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}

.schedule-time {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.schedule-hours {
    font-size: 0.7rem;
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(233, 30, 99, 0.15);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

.two-people-badge {
    font-size: 0.65rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.help-badge {
    font-size: 0.65rem;
    background: rgba(255, 152, 0, 0.2);
    color: var(--warning);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.day-cell.day-off {
    background-color: #15241b;
    background-image: linear-gradient(135deg, #1b2f22 0%, #15241b 100%);
    border-left: 3px solid var(--success);
}

.day-cell.day-off:hover {
    background-color: #1b2f22;
    background-image: linear-gradient(135deg, #25442e 0%, #1b2f22 100%);
}

.day-off-badge {
    font-size: 0.7rem;
    background: linear-gradient(135deg, var(--success) 0%, #388E3C 100%);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.day-off-reason {
    font-size: 0.65rem;
    color: var(--success);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-off-delete {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(244, 67, 54, 0.2);
    color: var(--error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 10;
}

.day-off-delete:hover {
    background: var(--error);
    color: white;
    transform: scale(1.1);
}

.day-cell.day-off {
    position: relative;
}

/* Table Actions */
.table-actions {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.table-actions .btn-danger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Summary Table */


.summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-table-cell {
    padding: 3rem 1.5rem;
    text-align: center;
}

/* Cash Tab Styles */
.cash-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cash-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.cash-filters {
    margin-bottom: 1rem;
}

.denom-section {
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    background: var(--surface-light);
    margin-bottom: 1.5rem;
}

.denom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.denom-grid {
    display: grid;
    gap: 0.75rem;
}

.denom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface);
    border-radius: 12px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
}

.denom-label {
    font-weight: 600;
    color: var(--text-primary);
}

.denom-sum {
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

.denom-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.extra-expenses {
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    background: var(--surface-light);
    margin-bottom: 1.5rem;
}

.extra-expenses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.extra-expenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.extra-expenses-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-primary);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.checkbox-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.input-field {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--shadow);
}

/* Custom Select Styling */
.input-field[type="select"],
select.input-field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E91E63' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.input-field[type="select"]:hover,
select.input-field:hover {
    border-color: var(--primary-color);
}

.input-field[type="select"]:focus,
select.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--shadow);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--shadow);
}

.input-field::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Cash Result */
.cash-result {
    animation: slideIn 0.3s ease;
}

.result-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.result-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.result-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--surface-light);
    border-radius: 12px;
}

.result-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.result-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-difference {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border: 2px solid var(--border-color);
}

.result-difference.positive {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, var(--surface) 100%);
}

.result-difference.positive .result-value {
    color: var(--success);
}

.result-difference.negative {
    border-color: var(--error);
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, var(--surface) 100%);
}

.result-difference.negative .result-value {
    color: var(--error);
}

.result-final {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.12) 0%, var(--surface) 100%);
}

.result-final.positive {
    border-color: var(--success);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.12) 0%, var(--surface) 100%);
}

.result-final.negative {
    border-color: var(--error);
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.12) 0%, var(--surface) 100%);
}

.result-status .result-value {
    font-weight: 700;
}

.result-status.positive .result-value {
    color: var(--success);
}

.result-status.negative .result-value {
    color: var(--error);
}

.result-status.neutral .result-value {
    color: var(--text-secondary);
}

.history-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (max-width: 700px) {
    .cash-card {
        padding: 1.25rem;
    }

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

    .denom-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "label label"
            "input sum";
    }

    .denom-row .denom-label {
        grid-area: label;
    }

    .denom-row .denom-count {
        grid-area: input;
    }

    .denom-row .denom-sum {
        grid-area: sum;
    }

    .extra-expenses-grid {
        grid-template-columns: 1fr;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .btn-full {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
}

/* Cash History */
.cash-history {
    margin-top: 1rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.2s ease;
}

.history-item:hover {
    border-color: rgba(233, 30, 99, 0.4);
    transform: translateY(-2px);
}

.history-info {
    flex: 1;
}

.history-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.history-employee {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.history-amount {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.history-amount.positive {
    color: var(--success);
    background: rgba(76, 175, 80, 0.1);
}

.history-amount.negative {
    color: var(--error);
    background: rgba(244, 67, 54, 0.1);
}

.history-amount.neutral {
    color: var(--text-secondary);
    background: var(--surface-light);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 1rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--surface);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.all-stores-content {
    padding: 1.25rem 1.5rem 1.75rem;
}

.all-stores-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.all-stores-table-wrapper {
    overflow-x: auto;
    max-height: 70vh;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.all-stores-table td.store-cell {
    font-weight: 700;
}

.all-stores-cell {
    font-size: 0.78rem;
    line-height: 1.2;
    background-color: var(--surface);
}

.all-stores-cell.has-staff {
    background-color: #2b111b;
    background-image: linear-gradient(135deg, #3b1524 0%, #2b111b 100%);
    border-left: 3px solid var(--primary-color);
}

.all-stores-cell.empty {
    background: var(--surface);
}

#allStoresModal .modal-content {
    max-width: 1200px;
    width: min(96vw, 1200px);
}

.all-stores-table .employee-name-cell {
    cursor: default;
}

.all-stores-table .employee-name-cell:hover {
    background: var(--surface);
}

.all-stores-table {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

.all-stores-table,
.all-stores-table thead,
.all-stores-table tbody,
.all-stores-table tbody tr {
    background-color: var(--surface);
}

.all-stores-table th,
.all-stores-table td {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top: 0;
    border-bottom: 0;
    background-clip: padding-box;
    background-color: var(--surface);
}

.all-stores-table th {
    background-color: var(--surface-light);
    background-image: none;
}

.all-stores-table th.day-header,
.all-stores-table td.all-stores-cell {
    width: var(--day-col-width);
    min-width: var(--day-col-width);
}

.all-stores-table td.all-stores-cell {
    padding: 0.55rem 0.4rem;
}

.all-stores-table tbody tr:nth-child(even) td.store-cell,
.all-stores-table tbody tr:nth-child(even) td.all-stores-cell.empty {
    background-color: var(--surface);
}

#allStoresModal .modal-header {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2) 0%, rgba(26, 26, 26, 0.9) 60%);
    border-bottom: 1px solid rgba(233, 30, 99, 0.2);
}

#allStoresModal .modal-header h2 {
    font-size: 1.6rem;
}

.all-stores-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(233, 30, 99, 0.12);
    border: 1px solid rgba(233, 30, 99, 0.25);
    font-weight: 600;
}

.staff-stack {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
}

.staff-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.45rem;
    border-radius: 8px;
    background: rgba(233, 30, 99, 0.18);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.72rem;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.18);
}

.staff-empty {
    color: var(--text-secondary);
    font-weight: 600;
}

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


.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

.modal form {
    padding: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions button {
    flex: 1;
}

/* Schedule Form in Modal */
.schedule-form {
    padding: 1.5rem;
}

.schedule-day-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.time-inputs-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: opacity 0.3s ease;
}

/* Toggle Switch */
.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--surface-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.toggle-switch-wrapper:hover {
    border-color: var(--primary-color);
    background: rgba(233, 30, 99, 0.05);
}

.toggle-switch-wrapper input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 56px;
    height: 32px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle-slider {
    position: relative;
    width: 56px;
    height: 32px;
    background: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--text-secondary);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.toggle-switch-wrapper input[type="checkbox"]:checked + .toggle-switch .toggle-slider {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
}

.toggle-switch-wrapper input[type="checkbox"]:checked + .toggle-switch .toggle-slider::before {
    transform: translateX(24px);
    background: white;
}

.toggle-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    user-select: none;
    cursor: pointer;
    margin: 0;
}

.btn-day-off {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Shift Time Inputs */
.shift-time-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shift-time {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.time-separator {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 300;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.warning-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 12px;
    color: var(--warning);
    font-size: 0.9rem;
}

.warning-message svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    flex-shrink: 0;
}

.modal-large {
    max-width: 600px;
}

/* Employee Profile */
.profile-content {
    padding: 1.5rem;
}

.profile-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.profile-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--surface-light);
    border-radius: 12px;
}

.profile-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.profile-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.profile-value a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.profile-value a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.no-data {
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 400;
}

.profile-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    justify-content: flex-start;
}

.profile-actions button {
    flex: 1 1 220px;
    min-width: 180px;
}

.profile-summary {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.summary-header,
.summary-row {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1.2fr 0.8fr;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    align-items: center;
}

.summary-header {
    background: var(--surface-light);
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
}

.summary-row:nth-child(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.summary-date {
    font-weight: 600;
    color: var(--text-primary);
}

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

.summary-time,
.summary-people {
    color: var(--text-secondary);
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.35rem;
}

.badge-warning {
    background: rgba(255, 152, 0, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--error) 0%, #D32F2F 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.2);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --name-col-width: 150px;
        --hours-col-width: 80px;
        --day-col-width: 60px;
    }
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .store-buttons-container {
        flex-direction: column;
    }

    .store-btn {
        width: 100%;
    }

    .store-summary-btn {
        width: 100%;
        justify-content: center;
    }

    .hours-norm-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hours-norm-value {
        width: 100%;
    }

    .hours-norm-input {
        flex: 1;
    }

    .schedule-table {
        min-width: 600px;
    }

    .day-cell {
        min-width: 60px;
        padding: 0.5rem 0.25rem;
    }

    .schedule-time {
        font-size: 0.7rem;
    }

    .two-people-badge,
    .help-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    .employee-name-cell {
        min-width: var(--name-col-width);
        padding: 1rem;
    }

    .month-hours-cell {
        left: var(--name-col-width);
        min-width: var(--hours-col-width);
    }

    .schedule-table th.employee-col {
        min-width: var(--name-col-width);
    }

    .schedule-table th.hours-col {
        left: var(--name-col-width);
        min-width: var(--hours-col-width);
    }

    .modal-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .modal-large {
        max-width: calc(100% - 2rem);
    }
}

@media (max-width: 480px) {
    :root {
        --name-col-width: 140px;
        --hours-col-width: 72px;
        --day-col-width: 56px;
    }
    .tab-content {
        padding: 1rem;
    }

    .schedule-table {
        min-width: 500px;
    }

    .day-cell {
        min-width: 50px;
        padding: 0.4rem 0.2rem;
    }

    .day-schedule-content {
        gap: 0.3rem;
    }

    .schedule-time {
        font-size: 0.65rem;
    }

    .schedule-hours {
        font-size: 0.7rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--surface);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 0.95rem;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInToast 0.3s ease;
}

@keyframes slideInToast {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToast {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--primary-color);
}

.toast.exiting {
    animation: slideOutToast 0.3s ease forwards;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--surface-light);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* Loading Indicator */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--surface-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    backdrop-filter: blur(4px);
}

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

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid var(--surface-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Confirmation Dialog */
.confirmation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.confirmation-dialog.active {
    display: flex;
}

.confirmation-content {
    background: var(--surface);
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
}

.confirmation-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.confirmation-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
}

.confirmation-actions button {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.confirmation-cancel {
    background: var(--surface-light);
    color: var(--text-primary);
}

.confirmation-cancel:hover {
    background: var(--border-color);
}

.confirmation-confirm {
    background: var(--error);
    color: white;
}

.confirmation-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

/* Search and Filter */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.search-bar svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    color: var(--text-secondary);
}

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .toast-container {
        bottom: 1rem;
        right: 1rem;
    }

    .toast {
        min-width: 280px;
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Analytics Tab */
.analytics-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.stats-buttons {
    display: flex;
    gap: 0.75rem;
}

.analytics-month {
    max-width: 220px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.analytics-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.analytics-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--surface-light);
    border-radius: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.analytics-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 600px;
    overflow-y: auto;
}

.employee-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--surface-light);
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.employee-stat:hover {
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

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

.employee-stat-store {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.employee-stat-hours {
    text-align: right;
}

.employee-stat-hours-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.employee-stat-hours-norm {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.employee-stat.norm-ok .employee-stat-hours-value {
    color: var(--success);
}

.employee-stat.norm-low .employee-stat-hours-value {
    color: var(--warning);
}
