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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

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

/* Left Sidebar */
.sidebar {
    width: 320px;
    min-width: 320px;
    background: #1e293b;
    color: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #334155;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #334155;
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.sidebar-header .subtitle {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 2px;
}

/* Sidebar Tabs */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #334155;
}

.sidebar-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-tab:hover {
    background: #334155;
    color: #fff;
}

.sidebar-tab.active {
    background: #334155;
    color: #fff;
    border-bottom: 2px solid #4f46e5;
}

/* Sidebar Content */
.sidebar-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.sidebar-content.active {
    display: flex;
}

.sidebar-search {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #334155;
}

.sidebar-search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #475569;
    border-radius: 6px;
    background: #334155;
    color: #fff;
    font-size: 13px;
}

.sidebar-search input::placeholder {
    color: #94a3b8;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #4f46e5;
}

.btn-add {
    width: 36px;
    height: 36px;
    border: none;
    background: #4f46e5;
    color: #fff;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add:hover {
    background: #4338ca;
}

/* List Container */
.list-container {
    flex: 1;
    overflow-y: auto;
}

.list-item {
    padding: 12px 16px;
    border-bottom: 1px solid #334155;
    cursor: pointer;
    transition: all 0.2s;
}

.list-item:hover {
    background: #334155;
}

.list-item.active {
    background: #4f46e5;
}

.list-item-name {
    font-weight: 500;
    font-size: 14px;
    color: #fff;
}

.list-item-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.list-item.active .list-item-meta {
    color: #c7d2fe;
}

.list-empty {
    padding: 20px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f1f5f9;
}

/* Stats Dashboard */
.stats-dashboard {
    display: flex;
    gap: 16px;
    padding: 20px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.stat-card {
    flex: 1;
    min-width: 120px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-card .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.stat-card .stat-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.stat-card.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
}

.stat-card.active .stat-value,
.stat-card.active .stat-label {
    color: #fff;
}

.stat-card.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
}

.stat-card.warning .stat-value,
.stat-card.warning .stat-label {
    color: #fff;
}

.stat-card.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
}

.stat-card.danger .stat-value,
.stat-card.danger .stat-label {
    color: #fff;
}

/* Welcome Panel */
.welcome-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.welcome-content {
    text-align: center;
    max-width: 500px;
}

.welcome-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.welcome-content p {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 8px;
}

/* Detail Panel */
.detail-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.detail-header {
    padding: 24px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.detail-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-title h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
}

.detail-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* Provider Info Section */
.provider-info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-block-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    line-height: 1.6;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.info-textarea:hover {
    border-color: #cbd5e1;
}

.info-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.info-textarea::placeholder {
    color: #94a3b8;
}

.info-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.info-input:hover {
    border-color: #cbd5e1;
}

.info-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.min-fee-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.min-fee-input-wrapper:hover {
    border-color: #cbd5e1;
}

.min-fee-input-wrapper:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.min-fee-input-wrapper .currency-prefix {
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
}

.min-fee-input-wrapper .info-input {
    border: none;
    border-radius: 0;
    padding-left: 12px;
}

.min-fee-input-wrapper .info-input:focus {
    box-shadow: none;
}

/* Rich Text Editor */
.rich-text-editor {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rich-text-editor:hover {
    border-color: #cbd5e1;
}

.rich-text-editor:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.toolbar-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    transition: all 0.15s;
}

.toolbar-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.toolbar-btn.active {
    background: #4f46e5;
    color: #fff;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 6px;
}

.editor-content {
    min-height: 100px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    line-height: 1.6;
    outline: none;
}

.editor-content:empty:before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}

.editor-content ul,
.editor-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.editor-content li {
    margin: 4px 0;
}

.training-fullname {
    color: #64748b;
    font-size: 15px;
    margin-top: 4px;
}

/* Detail Tabs */
.detail-tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
}

.detail-tab {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.detail-tab:hover {
    color: #1e293b;
}

.detail-tab.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

/* Detail Content */
.detail-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

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

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

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

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

.year-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.year-selector label {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.year-selector select {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
}

.year-selector select:hover {
    border-color: #cbd5e1;
}

.year-selector select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Contacts Grid */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.contact-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    position: relative;
}

.contact-card.primary {
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px #4f46e5;
}

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

.contact-name {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
}

.contact-role {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}

.contact-badge {
    background: #4f46e5;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-detail {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-detail a {
    color: #4f46e5;
    text-decoration: none;
}

.contact-detail a:hover {
    text-decoration: underline;
}

.contact-notes {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #64748b;
    font-style: italic;
}

.contact-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.contacts-empty {
    text-align: center;
    padding: 40px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
}

/* Table */
.table-container {
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

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

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table td {
    font-size: 14px;
}

.table-empty {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

/* Buttons */
.btn-primary {
    padding: 10px 20px;
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #4338ca;
}

.btn-secondary {
    padding: 10px 20px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-danger {
    padding: 10px 20px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-icon {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f1f5f9;
}

.btn-icon.edit {
    color: #4f46e5;
}

.btn-icon.delete {
    color: #ef4444;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-active {
    background: #dcfce7;
    color: #16a34a;
}

.badge-expired {
    background: #fee2e2;
    color: #dc2626;
}

.badge-suspended {
    background: #fef3c7;
    color: #d97706;
}

.badge-language {
    background: #dbeafe;
    color: #2563eb;
}

.badge-count {
    background: #e2e8f0;
    color: #64748b;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-content.modal-small {
    max-width: 400px;
}

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

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

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: #1e293b;
}

/* Forms */
form {
    padding: 20px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group .hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.delete-message {
    padding: 0 20px 20px;
    color: #64748b;
    font-size: 14px;
}

/* Fee display */
.fee-display {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
}

.fee-display.empty {
    color: #9ca3af;
}

/* Sessions Summary */
.sessions-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 24px;
    border: 1px solid #e2e8f0;
    text-align: center;
    min-width: 140px;
}

.summary-card .summary-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.summary-card .summary-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.summary-card.highlight {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: #4f46e5;
}

.summary-card.highlight .summary-value,
.summary-card.highlight .summary-label {
    color: #fff;
}

.summary-card.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #d97706;
}

.summary-card.warning .summary-value,
.summary-card.warning .summary-label {
    color: #fff;
}

.summary-card.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #059669;
}

.summary-card.success .summary-value,
.summary-card.success .summary-label {
    color: #fff;
}

/* Invoice Amount Section in Modal */
.invoice-amount-section {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.invoice-amount-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 8px;
}

.invoice-amount-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.invoice-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #86efac;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.invoice-input-wrapper:focus-within {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.invoice-input-wrapper .currency-symbol {
    padding: 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: #16a34a;
    background: #dcfce7;
    height: 100%;
    display: flex;
    align-items: center;
}

.invoice-input-wrapper input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
    color: #166534;
    background: transparent;
    width: 100%;
}

.invoice-input-wrapper input:focus {
    outline: none;
}

.invoice-input-wrapper input::placeholder {
    color: #a7f3d0;
    font-weight: 400;
}

.btn-recalc {
    padding: 10px 14px;
    background: #dcfce7;
    border: 2px solid #86efac;
    border-radius: 8px;
    color: #166534;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-recalc:hover {
    background: #bbf7d0;
    border-color: #22c55e;
}

.fee-hint {
    font-size: 12px;
    color: #15803d;
    margin-top: 8px;
    font-style: italic;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.document-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
}

.document-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.document-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.document-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.document-icon.pdf { background: #fee2e2; color: #dc2626; }
.document-icon.doc, .document-icon.docx { background: #dbeafe; color: #2563eb; }
.document-icon.xls, .document-icon.xlsx { background: #dcfce7; color: #16a34a; }
.document-icon.img { background: #fef3c7; color: #d97706; }
.document-icon.default { background: #f1f5f9; color: #64748b; }

.document-info {
    flex: 1;
    min-width: 0;
}

.document-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    word-break: break-word;
    line-height: 1.3;
}

.document-meta {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.document-description {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.document-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.documents-empty {
    text-align: center;
    padding: 40px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
}

/* File Upload Area */
.file-upload-area {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: #4f46e5;
    background: #f5f3ff;
}

.file-upload-area.dragover {
    border-color: #4f46e5;
    background: #ede9fe;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.upload-icon {
    font-size: 32px;
}

.upload-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.upload-hint {
    font-size: 12px;
    color: #9ca3af;
}

.file-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.file-selected .file-icon {
    width: 28px;
    height: 28px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.file-selected .file-name {
    font-weight: 500;
    color: #1e293b;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-selected .file-size {
    font-size: 12px;
    color: #64748b;
}

/* Form hint text */
.form-hint {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 1024px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: auto;
        height: auto;
        max-height: 40vh;
    }

    .stats-dashboard {
        flex-wrap: wrap;
    }

    .stat-card {
        min-width: 100px;
    }

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

@media (max-width: 768px) {
    .stat-card {
        min-width: 80px;
        padding: 12px;
    }

    .stat-card .stat-value {
        font-size: 22px;
    }

    .detail-header {
        padding: 16px;
    }

    .detail-content {
        padding: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

}

/* Statistics Sidebar */
.stats-sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #334155;
}

.stats-sidebar-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.stats-year-filter {
    padding: 12px 16px;
    border-bottom: 1px solid #334155;
}

.stats-year-filter label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.stats-year-filter select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #475569;
    border-radius: 6px;
    background: #334155;
    color: #fff;
    font-size: 13px;
}

.stats-year-filter select:focus {
    outline: none;
    border-color: #4f46e5;
}

.stats-nav {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 4px;
}

.stats-nav-btn {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.stats-nav-btn:hover {
    background: #334155;
    color: #fff;
}

.stats-nav-btn.active {
    background: #4f46e5;
    color: #fff;
}

/* Statistics Panel */
.statistics-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.statistics-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.stats-report {
    display: none;
}

.stats-report.active {
    display: block;
}

.stats-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.stats-summary .summary-card {
    flex: 1;
    min-width: 160px;
}

/* Status badges for revenue */
.revenue-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.revenue-status.met {
    background: #dcfce7;
    color: #16a34a;
}

.revenue-status.below {
    background: #fef3c7;
    color: #d97706;
}

.revenue-status.none {
    background: #fee2e2;
    color: #dc2626;
}

/* Highlight rows */
.data-table tbody tr.highlight-warning {
    background: #fef3c7;
}

.data-table tbody tr.highlight-warning:hover {
    background: #fde68a;
}

.data-table tbody tr.highlight-success {
    background: #dcfce7;
}

.data-table tbody tr.highlight-success:hover {
    background: #bbf7d0;
}

/* User Menu */
.user-menu {
    position: relative;
    margin-top: 12px;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    width: 100%;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    background: #475569;
    border-color: #64748b;
}

.user-menu-btn .user-icon {
    font-size: 16px;
}

.user-menu-btn .username {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.user-menu-btn .dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 4px;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #e2e8f0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: #334155;
}

.dropdown-item .item-icon {
    font-size: 14px;
}

.dropdown-item.logout {
    color: #f87171;
    border-top: 1px solid #334155;
}

.dropdown-item.logout:hover {
    background: #450a0a;
    color: #fca5a5;
}

/* Password Requirements Box */
.password-requirements-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 20px 16px;
    font-size: 13px;
}

.password-requirements-box h4 {
    margin: 0 0 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.password-requirements-box ul {
    margin: 0;
    padding-left: 20px;
    color: #64748b;
}

.password-requirements-box li {
    margin-bottom: 4px;
    transition: color 0.2s;
}

.password-requirements-box li.valid {
    color: #16a34a;
}

.password-requirements-box li.valid::marker {
    content: "✓ ";
}

.password-requirements-box li.invalid {
    color: #dc2626;
}

.password-requirements-box li.invalid::marker {
    content: "✗ ";
}

/* Form Error and Success Messages */
.form-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 20px 16px;
    font-size: 14px;
}

.form-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 0 20px 16px;
    font-size: 14px;
}
