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

:root {
    --primary: #0078D4;
    --primary-dark: #005a9e;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --sidebar-bg: #1B3A5C;
    --sidebar-text: #AAC4E0;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-muted: #6c757d;
    --border: #dee2e6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.logo {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo h1 {
    color: white;
    font-size: 24px;
    margin-bottom: 5px;
}

.logo span {
    font-size: 12px;
    opacity: 0.7;
}

.nav-menu {
    list-style: none;
    padding: 10px 0;
    flex: 1;
}

.nav-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-menu li a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-menu li a.active {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer a {
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 13px;
}

.sidebar-footer a:hover {
    color: white;
}

/* Main Content */
.content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

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

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

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

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

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Data Grid */
.data-grid {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.data-grid table {
    width: 100%;
    border-collapse: collapse;
}

.data-grid th,
.data-grid td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-grid th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.data-grid tr:hover {
    background: #f8f9fa;
}

.data-grid .actions {
    white-space: nowrap;
}

.data-grid .actions button {
    margin-left: 5px;
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    align-items: center;
}

.filters select,
.filters input {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.filters input[type="text"] {
    min-width: 250px;
    flex: 1;
    max-width: 400px;
}

.filters .per-page-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 13px;
    color: var(--text-muted);
}

.filters .per-page-group select {
    min-width: 70px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination-buttons button {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    min-width: 32px;
    transition: all 0.15s;
}

.pagination-buttons button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-buttons button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 4px 6px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,120,212,0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Reports */
.report-controls {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.report-type-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.report-type-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.report-params {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.report-params select,
.report-params input {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.report-select {
    min-width: 200px;
}

.report-date {
    width: 100px;
}

.report-content {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Report Styles */
.report-header {
    background: var(--sidebar-bg);
    color: white;
    padding: 20px;
}

.report-header.publisher {
    background: #2E7D32;
}

.report-header.game {
    background: #4A148C;
}

.report-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.report-header p {
    opacity: 0.8;
    font-size: 14px;
}

.report-section {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.report-section:last-child {
    border-bottom: none;
}

.report-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

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

.badge-warning {
    background: var(--warning);
    color: #333;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.report-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.report-stat .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 5px;
}

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

.report-stat .value.primary {
    color: var(--primary);
}

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

.report-stat .value.warning {
    color: #E65100;
}

.currency-breakdown {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-top: 10px;
}

.currency-breakdown h5 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--sidebar-bg);
}

.report-footer {
    background: var(--sidebar-bg);
    color: white;
    padding: 20px;
}

.report-footer.publisher {
    background: #2E7D32;
}

.report-footer.game {
    background: #4A148C;
}

.report-footer h4 {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.total-item .label {
    font-size: 11px;
    opacity: 0.7;
}

.total-item .value {
    font-size: 20px;
    font-weight: 600;
}

/* Lifetime earnings table */
.lifetime-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.lifetime-table th, .lifetime-table td {
    padding: 5px 8px;
    border: 1px solid var(--border);
    white-space: nowrap;
}
.lifetime-table th {
    background: #2c3e50;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
}
.lifetime-table th.num, .lifetime-table td.num {
    text-align: right;
}
.lifetime-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}
.lifetime-table tbody tr:hover {
    background: #e8f0fe;
}
.lifetime-table tfoot td {
    background: #2c3e50;
    color: #fff;
    padding: 6px 8px;
}

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

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Sales Matrix */
.sales-controls {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.month-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.month-selector label {
    font-weight: 500;
    color: var(--text-muted);
}

.month-selector input,
.month-selector select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.month-selector input {
    width: 80px;
}

.dirty-indicator {
    background: var(--warning);
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.sales-matrix {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.sales-matrix table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.sales-matrix th,
.sales-matrix td {
    padding: 4px 6px;
    border: 1px solid var(--border);
    text-align: center;
    font-size: 11px;
    line-height: 1.3;
}

.sales-matrix th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 11px;
}

.sales-matrix th.game-row-header {
    text-align: left;
    min-width: 150px;
}

.sales-matrix th.platform-col-header {
    min-width: 60px;
    max-width: 80px;
    padding: 4px 3px;
    font-size: 10px;
    vertical-align: bottom;
    white-space: normal;
    line-height: 1.2;
}

.sales-matrix th.platform-col-header .platform-name {
    font-weight: 600;
    font-size: 11px;
    word-break: break-word;
}

.sales-matrix th.platform-col-header .platform-info {
    font-size: 9px;
    color: var(--primary);
    margin-top: 1px;
}

.sales-matrix th.total-col-header {
    min-width: 70px;
    background: var(--sidebar-bg);
    color: white;
}

.sales-matrix td.game-cell {
    text-align: left;
    font-weight: 500;
    background: #f8f9fa;
    min-width: 150px;
    font-size: 11px;
}

.sales-matrix td.game-cell .game-developer {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: normal;
}

.sales-matrix td.cell-usd {
    background: #e3f2fd;
}

.sales-matrix td.cell-eur {
    background: #e8f5e9;
}

.sales-matrix td.row-total {
    font-weight: 600;
    background: #f8f9fa;
    text-align: right;
}

.sales-matrix td.grand-total {
    font-weight: 700;
    font-size: 12px;
}

.sales-matrix input.revenue-input {
    width: 100%;
    max-width: 80px;
    padding: 3px 5px;
    border: 1px solid var(--border);
    border-radius: 3px;
    text-align: right;
    font-size: 11px;
    font-family: 'Consolas', 'Monaco', monospace;
    box-sizing: border-box;
}

.sales-matrix input.revenue-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #e3f2fd;
}

.sales-matrix input.revenue-input.modified {
    background: #fff3e0;
    border-color: var(--warning);
}

.sales-matrix input.revenue-input.has-value {
    font-weight: 600;
}

.sales-matrix .pln-label {
    font-size: 9px;
    color: #888;
    text-align: right;
    min-height: 12px;
    line-height: 12px;
    font-family: 'Consolas', 'Monaco', monospace;
    padding-right: 2px;
}

.sales-matrix tbody tr:hover {
    background: rgba(0,0,0,0.02);
}

.sales-matrix tbody tr:hover td.game-cell {
    background: #eee;
}

.sales-matrix tfoot td {
    font-weight: 600;
    background: var(--sidebar-bg);
    color: white;
}

.sales-matrix tfoot td.total-label {
    text-align: right;
}

.sales-matrix tfoot td.grand-total {
    font-weight: 700;
    font-size: 12px;
}

.sales-matrix th.total-usd-header {
    background: #1565c0;
    min-width: 90px;
}

.sales-matrix th.total-eur-header {
    background: #2e7d32;
    min-width: 90px;
}

.sales-matrix td.row-total-usd {
    background: #e3f2fd;
    color: #1565c0;
}

.sales-matrix td.row-total-eur {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Multi-select dropdown */
.multi-select {
    position: relative;
}

.multi-select-toggle {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.multi-select-toggle:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,120,212,0.1);
}

.multi-select-toggle::after {
    content: "▼";
    font-size: 10px;
    color: #666;
}

.multi-select.open .multi-select-toggle::after {
    content: "▲";
}

.multi-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.multi-select.open .multi-select-dropdown {
    display: block;
}

.multi-select-group {
    padding: 8px 0;
}

.multi-select-group-label {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    background: #f8f9fa;
}

.multi-select-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: normal;
    white-space: nowrap;
}

.multi-select-option:hover {
    background: #e3f2fd;
}

.multi-select-option input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
}

.multi-select-option span {
    flex: 1;
}

/* Game Platforms Matrix */
.sales-matrix td input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--primary);
}

/* Report Period Selector */
.report-period-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.report-period-selector label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: 500;
}

/* Yearly Report Styles */
.yearly-month {
    background: #fafafa;
}

.yearly-month h4 {
    background: var(--sidebar-bg);
    color: white;
    margin: -20px -20px 15px -20px;
    padding: 12px 20px;
    font-size: 14px;
}

.yearly-game-summary {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.yearly-game-summary:last-child {
    border-bottom: none;
}

.game-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.yearly-currency-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.currency-chip {
    display: inline-block;
    padding: 4px 10px;
    background: #e3f2fd;
    border-radius: 4px;
    font-size: 12px;
    color: #1565c0;
}

.currency-chip.warning {
    background: #fff3e0;
    color: #e65100;
}

.monthly-subtotal {
    margin-top: 12px;
    padding: 10px 15px;
    background: #e8eaf6;
    border-radius: 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.monthly-subtotal.publisher {
    background: #e8f5e9;
    flex-direction: column;
    align-items: stretch;
}

.subtotal-chip {
    display: inline-block;
    padding: 4px 10px;
    background: white;
    border-radius: 4px;
    font-size: 12px;
}

.subtotal-chip.warning {
    background: #ffe0b2;
    color: #e65100;
}

.publisher-month-stat {
    display: flex;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #c8e6c9;
    flex-wrap: wrap;
}

.publisher-month-stat:last-child {
    border-bottom: none;
}

.publisher-month-stat .currency-label {
    font-weight: 600;
    min-width: 40px;
}

/* Report Warnings */
.report-warnings {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.report-warnings h4 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 14px;
}

.warning-item {
    background: #fff;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
    color: #856404;
    font-size: 13px;
}

/* Platforms Info */
.platforms-info {
    background: #e8f5e9;
}

.platforms-info h4 {
    margin: 0 0 10px 0;
    color: #2e7d32;
    font-size: 14px;
}

.platforms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.platform-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    background: #c8e6c9;
    color: #1b5e20;
}

.platform-chip.pc {
    background: #e3f2fd;
    color: #1565c0;
}

.platform-chip.console {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Game Warnings (inline in report sections) */
.game-warnings {
    background: #fff3cd;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.game-warnings .warning-item {
    margin: 3px 0;
    padding: 5px 10px;
}

/* Badge danger */
.badge-danger {
    background: #f44336;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .logo span,
    .nav-menu li a span,
    .sidebar-footer {
        display: none;
    }

    .logo h1 {
        font-size: 16px;
    }

    .content {
        margin-left: 60px;
        padding: 15px;
    }

    .page-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Game list thumbnails */
.game-thumb { width: 100px; height: 48px; object-fit: cover; border-radius: 4px; display: block; background: #e8edf2; }
.game-thumb.no-img { visibility: hidden; }
.game-thumb-placeholder { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }

.manager-edit-section {
    background: #f0f4f8;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
}

.manager-edit-section h3 {
    margin: 0 0 5px;
    font-size: 16px;
}

/* Game detail developer table */
.dev-table { width: 100%; border-collapse: collapse; font-size: 13px; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; }
.dev-table th { padding: 8px 10px; font-weight: 600; color: #555; font-size: 11px; text-transform: uppercase; border-bottom: 2px solid #dee2e6; border-right: 1px solid #f0f0f0; text-align: left; background: #fafafa; }
.dev-table th:last-child { border-right: none; }
.dev-table td { padding: 8px 10px; border-bottom: 1px solid #eee; border-right: 1px solid #f5f5f5; vertical-align: middle; }
.dev-table td:last-child { border-right: none; }
.dev-table tbody tr:hover { background: #f8f9fa; }
.dev-table .add-row td { padding-top: 12px; border-top: 2px solid #dee2e6; border-bottom: none; }

.btn-save-sm { background: none; border: 1px solid var(--primary); color: var(--primary); padding: 4px 10px; border-radius: 4px; font-size: 11px; cursor: pointer; transition: all .2s; }
.btn-save-sm:hover { background: var(--primary); color: white; }
.btn-delete-sm { background: none; border: none; color: #bbb; padding: 4px 6px; cursor: pointer; font-size: 18px; line-height: 1; transition: color .2s; }
.btn-delete-sm:hover { color: var(--danger); }
.btn-outline-danger { background: none; border: 1px solid var(--danger); color: var(--danger); padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all .2s; }
.btn-outline-danger:hover { background: var(--danger); color: white; }

/* Page header actions */
.page-header-actions { display: flex; align-items: center; gap: 10px; }

/* Close Month */
.month-closed-badge { background: var(--danger); color: white; padding: 6px 12px; border-radius: 4px; font-size: 12px; font-weight: 600; }

/* Dispatch page */
.dispatch-table { width: 100%; border-collapse: collapse; }
.dispatch-table th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 600; color: #555; text-transform: uppercase; border-bottom: 2px solid var(--border); }
.dispatch-table td { padding: 10px 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
.dispatch-table tbody tr:hover { background: #f8f9fa; }

.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; display: inline-block; }
.status-badge.sent { background: #d4edda; color: #155724; }
.status-badge.error { background: #f8d7da; color: #721c24; }
.status-badge.pending { background: #e2e3e5; color: #383d41; }
.status-badge.sending { background: #cce5ff; color: #004085; }

.error-message { color: var(--danger); font-size: 12px; margin-top: 4px; }
.no-email-warning { color: var(--warning); font-size: 12px; }

/* Import Page */
.nav-separator { margin: 8px 16px; border-top: 1px solid rgba(255,255,255,0.15); }

.import-tabs { display: flex; gap: 0; margin-bottom: 0; border-bottom: 2px solid var(--border); }
.import-tab {
    padding: 8px 20px; border: none; background: none; cursor: pointer;
    font-size: 14px; font-weight: 500; color: var(--text-muted);
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s;
}
.import-tab:hover { color: var(--text); }
.import-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.import-panel { padding: 15px 0; }
.import-controls { margin-bottom: 10px; }

.import-textarea {
    width: 100%; min-height: 180px; padding: 12px; font-family: 'Consolas', 'Courier New', monospace;
    font-size: 12px; border: 1px solid var(--border); border-radius: 6px; resize: vertical;
    line-height: 1.5; background: #fafafa;
}
.import-textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(0,120,212,0.15); }

.import-actions { margin: 12px 0; display: flex; gap: 10px; align-items: center; }

.import-preview-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.import-preview-table th { background: var(--sidebar-bg); color: white; padding: 8px 10px; text-align: left; font-weight: 500; }
.import-preview-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); }
.import-preview-table tr:hover { background: #f0f7ff; }
.import-preview-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.import-match { color: var(--success); font-weight: 500; }
.import-no-match { color: var(--danger); font-weight: 500; }
.import-skip { opacity: 0.5; }

.import-summary { margin: 12px 0; padding: 12px 16px; background: #f0f7ff; border-radius: 6px; border-left: 4px solid var(--primary); font-size: 13px; }
.import-summary strong { color: var(--primary); }

/* Developer Report Redesign — Compact */
.dev-report-summary {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #2c5282 100%);
    color: white;
    padding: 14px 18px;
    border-radius: 8px 8px 0 0;
}
.dev-report-summary h3 { font-size: 16px; margin-bottom: 2px; }
.dev-report-summary .subtitle { opacity: 0.8; font-size: 13px; margin-bottom: 4px; }
.dev-report-summary .total-earnings {
    font-size: 15px; font-weight: 600; margin-bottom: 2px;
}
.dev-report-summary .earnings-detail { font-size: 12px; opacity: 0.75; }
.dev-report-summary .rates-line { font-size: 11px; opacity: 0.65; margin-top: 4px; }

/* Game Info List */
.dev-report-game-info-list {
    margin: 0 14px; padding: 8px 0;
}
.game-info-row {
    padding: 5px 10px; border-bottom: 1px solid #f0f0f0; font-size: 12px;
}
.game-info-row:last-child { border-bottom: none; }
.game-info-left {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.game-info-title { font-size: 13px; }
.game-info-lifetime { font-size: 11px; color: #666; }
.game-info-badges { display: flex; gap: 4px; align-items: center; }
.game-info-recoup { font-size: 11px; color: #888; margin-top: 2px; }

.ue-badge {
    background: #263238; color: #4fc3f7; padding: 2px 6px; border-radius: 3px;
    font-size: 9px; font-weight: 600; letter-spacing: 0.3px;
}
.unity-badge {
    background: #1a1a2e; color: #fff; padding: 2px 6px; border-radius: 3px;
    font-size: 9px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-sm {
    display: inline-block; padding: 2px 6px; border-radius: 3px;
    font-size: 9px; font-weight: 600; letter-spacing: 0.3px;
}
.badge-sm.badge-success { background: #28a745; color: #fff; }
.badge-sm.badge-warning { background: #ffc107; color: #333; }

.game-info-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.game-info-table th { text-align: left; font-size: 10px; color: #888; padding: 4px 8px; border-bottom: 1px solid #ddd; font-weight: 500; }
.game-info-table td { padding: 5px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.game-info-table tr:last-child td { border-bottom: none; }

.recoup-bar-container {
    height: 6px; background: #e0e0e0; border-radius: 3px; margin: 4px 0;
    overflow: hidden;
}
.recoup-bar-fill {
    height: 100%; border-radius: 3px; transition: width 0.3s;
    background: linear-gradient(90deg, #66bb6a, #43a047);
}
.recoup-bar-fill.full { background: linear-gradient(90deg, #43a047, #2e7d32); }
.recoup-bar-fill.low { background: linear-gradient(90deg, #ffa726, #fb8c00); }

/* Unified Breakdown Table */
.dev-report-unified-table {
    margin: 4px 14px 8px; border-radius: 6px; overflow: hidden;
    border: 1px solid var(--border);
}
.dev-report-unified-table table {
    width: 100%; border-collapse: collapse; font-size: 12px;
}
.dev-report-unified-table th {
    padding: 5px 8px; text-align: left; font-size: 10px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; border-bottom: 2px solid var(--border);
    background: #f8f9fa;
}
.dev-report-unified-table td {
    padding: 3px 8px; border-bottom: 1px solid #f0f0f0;
}
.dev-report-unified-table .game-group-first td {
    border-top: 2px solid var(--border);
}
.dev-report-unified-table tbody tr:first-child.game-group-first td {
    border-top: none;
}
.dev-report-unified-table .game-group-first td:first-child {
    font-weight: 600;
}
.dev-report-unified-table .ue-row td {
    background: #fff3e0; color: #e65100; font-style: italic;
}
.dev-report-unified-table .total-row td {
    background: var(--sidebar-bg); color: white; font-weight: 700; font-size: 13px;
    padding: 6px 8px;
}

.dev-report-footer {
    text-align: center; color: #999; font-size: 10px; padding: 8px 14px 14px;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-card {
    background: white;
    border-radius: 8px;
    padding: 40px;
    width: 380px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    color: var(--primary);
    font-size: 36px;
    margin-bottom: 4px;
}

.login-logo span {
    color: var(--text-muted);
    font-size: 13px;
}

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

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

.login-card .form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}

.login-card .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0,120,212,0.15);
}

.login-error {
    background: #fdecea;
    color: var(--danger);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
}

.login-btn {
    width: 100%;
    padding: 10px;
    font-size: 15px;
}

/* User info in sidebar */
.user-info {
    margin-bottom: 10px;
    font-size: 12px;
}

.user-info .user-name {
    color: white;
    font-weight: 600;
}

.user-info .user-role {
    color: var(--sidebar-text);
    font-size: 11px;
}

.user-info .logout-link {
    color: var(--sidebar-text);
    cursor: pointer;
    text-decoration: underline;
    font-size: 11px;
}

.user-info .logout-link:hover {
    color: white;
}

/* Role badge */
.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin { background: #e3f2fd; color: #1565c0; }
.role-badge.developer { background: #e8f5e9; color: #2e7d32; }
