/* ============================================
   VereinsKit Admin Dashboard
   ============================================ */

:root {
    --color-primary: #1e3a5f;
    --color-accent: #B8533E;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-danger: #dc3545;
    --color-bg: #f4f6f9;
    --color-card: #ffffff;
    --color-text: #333333;
    --color-text-light: #6c757d;
    --color-border: #e0e0e0;
    
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    
    --font: 'Inter', -apple-system, sans-serif;
}

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

html { font-size: 16px; }

body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

/* ============ LOGIN ============ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, #2a4a6f 100%);
}

.login-box {
    background: var(--color-card);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--color-accent);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.login-box h1 {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    font-weight: 500;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 1.5rem;
}

/* ============ LAYOUT ============ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--color-primary);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
}

.sidebar-header .logo-text {
    color: white;
    font-size: 1.25rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
}

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

.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-right: 3px solid var(--color-accent);
}

.nav-icon {
    font-size: 1.25rem;
}

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

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

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

.page-header h1 {
    font-size: 1.75rem;
    color: var(--color-primary);
}

.page-header p {
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

/* ============ STATS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--color-card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

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

.stat-card--success .stat-number { color: var(--color-success); }
.stat-card--warning .stat-number { color: var(--color-warning); }
.stat-card--danger .stat-number { color: var(--color-danger); }
.stat-card--info .stat-number { color: #17a2b8; }
.stat-card--preview .stat-number { color: #856404; }
.stat-card--info .stat-number { color: #007bff; }

/* ============ CARDS ============ */
.card {
    background: var(--color-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-header h2 {
    font-size: 1.25rem;
    color: var(--color-primary);
}

/* ============ WEBSITE GRID ============ */
.website-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.website-card {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}

.website-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.website-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.website-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-online, .website-status.status-online { background: var(--color-success); }
.status-pending, .website-status.status-pending { background: var(--color-warning); }
.status-offline, .website-status.status-offline { background: var(--color-danger); }
.status-preview, .website-status.status-preview { background: #007bff; }

.website-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

.website-domain {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.website-meta {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.website-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============ TABLE ============ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    font-weight: 600;
    color: var(--color-text-light);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background: var(--color-bg);
}

.data-table a {
    color: var(--color-primary);
}

.data-table .actions {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.status-online { background: #d4edda; color: #155724; }
.status-badge.status-pending { background: #fff3cd; color: #856404; }
.status-badge.status-offline { background: #f8d7da; color: #721c24; }
.status-badge.status-preview { background: #cce5ff; color: #004085; }

/* ============ URL CELL ============ */
.url-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.subdomain-link {
    color: var(--color-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.domain-link {
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.domain-link.active {
    background: #d4edda;
    color: #155724;
}

.domain-link.pending {
    background: #fff3cd;
    color: #856404;
}

.website-custom-domain {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0.25rem 0 0.5rem;
}

.website-custom-domain.active {
    color: var(--color-success);
}

.btn--link {
    background: none;
    border: none;
    color: var(--color-primary);
    padding: 0.25rem 0;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn--link:hover {
    color: var(--color-accent);
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

/* ============ FORMS ============ */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.form-section h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

.color-preview {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 8px;
}

.preview-bar {
    flex: 3;
    height: 60px;
    border-radius: 6px;
}

.preview-accent {
    flex: 1;
    height: 60px;
    border-radius: 6px;
}

.form-actions {
    margin-top: 2rem;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn--primary:hover {
    background: #9a4433;
}

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

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

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

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

.btn--sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn--full {
    width: 100%;
}

/* ============ ALERTS ============ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-light);
    grid-column: 1 / -1;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* ============ INFO TABLE ============ */
.info-table {
    width: 100%;
}

.info-table td {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.info-table td:first-child {
    font-weight: 500;
    width: 150px;
}

.info-table code {
    background: var(--color-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* ============ LOADING ============ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-overlay p {
    color: white;
    font-size: 1.1rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .website-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
    }
}

/* ============ MODAL ============ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

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

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

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

.modal-header h2 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 0;
    line-height: 1;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    font-size: 1rem;
    color: var(--color-primary);
    margin: 1.5rem 0 0.75rem;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-info-box {
    background: #e8f4f8;
    border-left: 4px solid var(--color-primary);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
}

.modal-info-box p {
    margin: 0.5rem 0;
}

.modal-info-box code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--color-accent);
}

.dns-quick-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.dns-quick-table th,
.dns-quick-table td {
    border: 1px solid var(--color-border);
    padding: 0.75rem;
    text-align: left;
}

.dns-quick-table th {
    background: var(--color-bg);
    font-weight: 600;
}

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

/* ============ PREVIEW CODE ============ */
.preview-code-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background 0.2s;
}

.preview-code-badge:hover {
    background: #ffe69c;
}

/* URL Cell Styles */
.url-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.subdomain-link {
    color: var(--color-primary);
    font-size: 0.9rem;
}

.domain-link {
    font-size: 0.85rem;
}

.domain-link.active {
    color: var(--color-success);
    font-weight: 600;
}

.domain-link.pending {
    color: var(--color-warning);
}

.btn--link {
    background: none;
    border: none;
    color: var(--color-primary);
    padding: 0;
    font-size: 0.8rem;
    cursor: pointer;
    text-decoration: underline;
}

.btn--link:hover {
    color: var(--color-accent);
}

/* Status Preview */
.status-badge.status-preview {
    background: #fff3cd;
    color: #856404;
}

/* ============ SUCCESS MODAL ============ */
.modal-header--success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.success-info-box {
    background: var(--color-bg);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.success-info-box h3 {
    font-size: 1rem;
    color: var(--color-primary);
    margin: 0 0 0.5rem 0;
}

.success-info-box p {
    margin: 0.5rem 0;
    color: var(--color-text-light);
}

.success-info-box .hint {
    font-size: 0.85rem;
    font-style: italic;
}

.preview-url-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    margin-top: 0.5rem;
}

.preview-url-box a {
    flex: 1;
    color: var(--color-primary);
    font-weight: 500;
    word-break: break-all;
}

.preview-code-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 2px dashed var(--color-accent);
    margin: 0.5rem 0;
}

.big-code {
    font-family: 'Courier New', monospace;
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--color-accent);
    letter-spacing: 0.3rem;
}

/* ============ DEVELOPMENT ============ */
.dev-status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dev-card {
    text-align: center;
}

.dev-card h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.dev-card p {
    margin: 0.5rem 0;
    color: var(--color-text-light);
}

.dev-path code {
    font-size: 0.75rem;
    background: var(--color-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    word-break: break-all;
}

.dev-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Workflow */
.workflow-steps {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.workflow-step {
    flex: 1;
    min-width: 180px;
    background: var(--color-bg);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.workflow-step .step-number {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.workflow-step h4 {
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.workflow-step p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0.25rem 0;
}

.workflow-step .hint {
    font-size: 0.75rem;
    font-style: italic;
}

.workflow-step code {
    font-size: 0.7rem;
    background: white;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
}

.workflow-arrow {
    font-size: 1.5rem;
    color: var(--color-text-light);
    padding-top: 2rem;
}

/* Diff List */
.diff-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-top: 1rem;
}

.diff-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.diff-item:last-child {
    border-bottom: none;
}

.diff-item code {
    font-size: 0.85rem;
}

.diff-added { background: #e8f5e9; }
.diff-modified { background: #fff8e1; }
.diff-deleted { background: #ffebee; }

.diff-type {
    font-size: 1rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge--success { background: #d4edda; color: #155724; }
.badge--warning { background: #fff3cd; color: #856404; }
.badge--danger { background: #f8d7da; color: #721c24; }

/* Quick Links */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.quick-link:hover {
    border-color: var(--color-primary);
    background: white;
}

/* Success Button */
.btn--success {
    background: var(--color-success);
    color: white;
}

.btn--success:hover {
    background: #218838;
}

@media (max-width: 992px) {
    .dev-status-grid {
        grid-template-columns: 1fr;
    }
    
    .workflow-steps {
        flex-direction: column;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
        padding: 0;
    }
}

/* ============ FILE MANAGER ============ */

/* Context Switcher */
.fm-context-switcher {
    margin-left: auto;
}

.fm-context-switcher select {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    min-width: 250px;
}

.fm-context-switcher select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.fm-context-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.fm-context-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.fm-context-badge.framework {
    background: #e3f2fd;
    color: #1565c0;
}

.fm-context-badge.client {
    background: #fff3e0;
    color: #e65100;
}

.fm-context-path {
    color: var(--color-text-light);
    font-family: monospace;
    font-size: 0.8rem;
}

.fm-context-warning {
    margin-left: auto;
    color: #e65100;
    font-weight: 500;
}

.file-manager {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.fm-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fm-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.fm-breadcrumbs .breadcrumb {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--color-primary);
}

.fm-breadcrumbs .breadcrumb:hover {
    background: var(--color-primary);
    color: white;
}

.fm-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.fm-search {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 0.9rem;
    width: 200px;
}

.fm-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.fm-sidebar {
    width: 300px;
    border-right: 1px solid var(--color-border);
    overflow-y: auto;
    background: #fafafa;
}

.fm-file-list {
    padding: 0.5rem;
}

.fm-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.fm-item:hover {
    background: #e8f0fe;
}

.fm-item.active {
    background: var(--color-primary);
    color: white;
}

.fm-item-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.fm-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-item-size {
    font-size: 0.75rem;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.fm-item-path {
    font-size: 0.7rem;
    color: var(--color-text-light);
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-empty, .fm-loading {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-light);
}

/* Editor */
.fm-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fm-editor-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--color-text-light);
}

.fm-editor-placeholder p {
    margin: 0.5rem 0;
}

.fm-editor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--color-primary);
    color: white;
}

.fm-editor-filename {
    font-weight: 600;
    font-size: 0.95rem;
}

.fm-editor-path {
    font-size: 0.8rem;
    opacity: 0.8;
    flex: 1;
}

.fm-editor-actions {
    display: flex;
    gap: 0.5rem;
}

.fm-editor-actions .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.fm-editor-wrap {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #1e1e1e;
}

.fm-line-numbers {
    width: 50px;
    padding: 1rem 0.5rem;
    background: #252526;
    color: #858585;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    text-align: right;
    overflow: hidden;
    user-select: none;
    white-space: pre;
}

.fm-editor {
    flex: 1;
    padding: 1rem;
    border: none;
    outline: none;
    resize: none;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #1e1e1e;
    color: #d4d4d4;
    tab-size: 4;
}

.fm-editor-footer {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: #007acc;
    color: white;
    font-size: 0.75rem;
}

.fm-editor-status.unsaved {
    color: #ffcc00;
    font-weight: 600;
}

/* Context Menu */
.fm-context-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.fm-context-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
}

.fm-context-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.fm-context-danger:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
}

/* Responsive */
@media (max-width: 900px) {
    .fm-sidebar {
        width: 250px;
    }
    
    .fm-search {
        width: 150px;
    }
}

@media (max-width: 700px) {
    .fm-container {
        flex-direction: column;
    }
    
    .fm-sidebar {
        width: 100%;
        height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }
}
