/**
 * Direktor Frontend Styles
 */

/* Reset for shortcode container */
.direktor-app,
.direktor-app * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Variables */
.direktor-app {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #8b5cf6;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-input: #252540;
    --bg-hover: #2a2a45;
    --border: #333350;
    --text: #e0e0e0;
    --text-muted: #888;
    --sidebar-width: 260px;
    --radius: 12px;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-dark);
    min-height: 100vh;
}

/* ==========================================
   LOGIN SCREEN
   ========================================== */

.direktor-login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.direktor-login-container {
    width: 100%;
    max-width: 420px;
}

.direktor-login-box {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.direktor-login-header {
    text-align: center;
    margin-bottom: 40px;
}

.direktor-logo {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.direktor-tagline {
    color: var(--text-muted);
    font-size: 14px;
}

.direktor-login-footer {
    text-align: center;
    margin-top: 30px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ==========================================
   MAIN APP LAYOUT
   ========================================== */

.direktor-app:not(.direktor-login-screen) {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.direktor-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s;
}

.direktor-sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--border);
}

.direktor-sidebar-header .direktor-logo {
    font-size: 24px;
}

.direktor-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.direktor-nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.direktor-nav-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.direktor-nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-left-color: var(--primary);
}

.direktor-nav-item .nav-icon {
    margin-right: 12px;
    font-size: 18px;
}

/* Clear transactions button */
.direktor-clear-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.direktor-clear-btn:hover {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

.direktor-clear-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.direktor-clear-btn .clear-icon {
    font-size: 16px;
}

.direktor-sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.direktor-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.direktor-user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.direktor-user-name {
    font-weight: 500;
    display: block;
}

.direktor-logout-link {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
}

.direktor-logout-link:hover {
    color: var(--danger);
}

/* Mobile Menu Toggle */
.direktor-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 101;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
}

/* Main Content */
.direktor-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    min-height: 100vh;
}

.direktor-page {
    display: none;
}

.direktor-page.active {
    display: block;
}

.direktor-page-header {
    margin-bottom: 30px;
}

.direktor-page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.direktor-page-header p {
    color: var(--text-muted);
}

/* ==========================================
   COMPONENTS
   ========================================== */

/* Cards */
.direktor-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

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

.direktor-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.direktor-card-body {
    padding: 25px;
}

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

.direktor-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.direktor-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.direktor-stat-card.income::before { background: linear-gradient(135deg, #22c55e, #16a34a); }
.direktor-stat-card.expense::before { background: linear-gradient(135deg, #ef4444, #dc2626); }
.direktor-stat-card.warning::before { background: linear-gradient(135deg, #f59e0b, #d97706); }

.direktor-stat-icon {
    font-size: 28px;
    margin-bottom: 15px;
}

.direktor-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.direktor-stat-label {
    color: var(--text-muted);
    font-size: 13px;
}

/* Grids */
.direktor-grid {
    display: grid;
    gap: 20px;
}

.direktor-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Charts */
.direktor-chart-container {
    position: relative;
    height: 280px;
}

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

.direktor-form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.direktor-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s;
}

.direktor-form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.direktor-form-control::placeholder {
    color: var(--text-muted);
}

select.direktor-form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

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

/* Buttons */
.direktor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1;
}

.direktor-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.direktor-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.direktor-btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.direktor-btn-secondary:hover {
    background: var(--bg-hover);
}

.direktor-btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.direktor-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.direktor-btn-sm { padding: 8px 14px; font-size: 13px; }
.direktor-btn-lg { padding: 16px 28px; font-size: 16px; }
.direktor-btn-block { width: 100%; }

/* Tables */
.direktor-table-container {
    overflow-x: auto;
}

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

.direktor-table th,
.direktor-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.direktor-table th {
    background: var(--bg-input);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.direktor-table tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

.amount-positive { color: var(--success); font-weight: 600; }
.amount-negative { color: var(--danger); font-weight: 600; }

/* Preview table scroll container */
.direktor-preview-container {
    position: relative;
}

.direktor-preview-scroll {
    max-height: 420px;
    overflow-y: auto;
    border-radius: 8px;
}

.direktor-scroll-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, #1a1a2e 0%, transparent 100%);
    pointer-events: none;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
    opacity: 1;
    transition: opacity 0.3s;
}

.direktor-scroll-indicator.hidden {
    opacity: 0;
}

.direktor-scroll-indicator span {
    color: #888;
    font-size: 12px;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Category Badge */
.direktor-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.direktor-category-badge:hover {
    background: var(--bg-hover);
}

.direktor-uncategorized {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px dashed var(--warning);
}

/* Category Dropdown */
.direktor-category-dropdown {
    position: fixed;
    background: #1a1a2e;
    border: 1px solid #333350;
    border-radius: 12px;
    width: 320px;
    max-height: 400px;
    z-index: 10000;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.direktor-category-dropdown.active {
    display: flex;
}

.direktor-category-dropdown-search {
    padding: 12px;
    border-bottom: 1px solid #333350;
    background: #252540;
}

.direktor-category-dropdown-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #333350;
    border-radius: 8px;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.direktor-category-dropdown-search input:focus {
    border-color: #6366f1;
}

.direktor-category-dropdown-search input::placeholder {
    color: #666;
}

.direktor-category-dropdown-list {
    flex: 1;
    overflow-y: auto;
    max-height: 320px;
}

.direktor-category-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #252540;
    color: #e0e0e0;
    font-size: 14px;
}

.direktor-category-dropdown-item:last-child {
    border-bottom: none;
}

.direktor-category-dropdown-item:hover {
    background: #252540;
}

.direktor-category-dropdown-item.main-cat {
    font-weight: 600;
    background: #1f1f35;
    color: #fff;
    padding: 10px 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
    border-bottom: 1px solid #333350;
}

.direktor-category-dropdown-item.sub-cat {
    padding-left: 36px;
    font-size: 13px;
}

.direktor-category-dropdown-item.sub-cat:hover {
    background: #6366f120;
}

.direktor-category-dropdown-item.sub-cat .cat-icon {
    font-size: 16px;
}

.direktor-category-dropdown-item .cat-keywords {
    color: #fff;
    font-size: 12px;
    font-weight: 400;
}

.direktor-category-dropdown-item .cat-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.direktor-category-dropdown-item .cat-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.direktor-category-dropdown-item.remove-cat {
    color: #ef4444;
    border-top: 1px solid #333350;
    background: #2a1a1a;
}

.direktor-category-dropdown-item.remove-cat:hover {
    background: #3a1a1a;
}

.direktor-category-dropdown-empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Filters */
.direktor-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    align-items: flex-end;
}

.direktor-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.direktor-filter-group label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.direktor-filter-group input,
.direktor-filter-group select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text);
    font-size: 14px;
    min-width: 140px;
}

/* Checkbox */
.direktor-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.direktor-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Bulk Actions */
.direktor-bulk-actions {
    display: none;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--bg-input);
    border-radius: var(--radius);
    margin-bottom: 15px;
}

.direktor-bulk-actions.active {
    display: flex;
}

/* Pagination */
.direktor-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 20px;
}

.direktor-pagination a,
.direktor-pagination span {
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.direktor-pagination a:hover {
    background: var(--bg-hover);
    color: #fff;
}

.direktor-pagination .current {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* Alerts */
.direktor-alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.direktor-alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.direktor-alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.direktor-alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.direktor-alert a {
    color: inherit;
    text-decoration: underline;
}

/* Categories */
.direktor-quick-actions {
    margin-bottom: 20px;
}

.direktor-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.direktor-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    background: var(--bg-input);
    border-radius: 10px;
    transition: all 0.2s;
}

.direktor-category-item:hover {
    background: var(--bg-hover);
}

.direktor-category-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.direktor-category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.direktor-category-name {
    font-weight: 500;
    color: #fff;
}

.direktor-category-count {
    font-size: 12px;
    color: var(--text-muted);
}

.direktor-subcategory-item {
    margin-left: 30px;
    padding-left: 30px;
    border-left: 2px solid var(--border);
    background: transparent;
    border-radius: 0;
}

.direktor-subcategory-list {
    min-height: 10px;
}

/* Drag and drop styles */
.direktor-sort-hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--primary) !important;
}

.sortable-chosen {
    background: var(--bg-hover) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.direktor-category-icon {
    cursor: grab;
    user-select: none;
}

.direktor-category-icon:active {
    cursor: grabbing;
}

.direktor-main-category {
    margin-bottom: 5px;
}

.direktor-category-actions {
    display: flex;
    gap: 8px;
}

/* Upload */
.direktor-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.direktor-upload-area:hover,
.direktor-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.direktor-upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.direktor-upload-text {
    font-size: 18px;
    margin-bottom: 10px;
}

.direktor-upload-hint {
    color: var(--text-muted);
    font-size: 14px;
}

.direktor-preview-table {
    max-height: 400px;
    overflow-y: auto;
}

.direktor-preview-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 550px;
}

.direktor-preview-table-full {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    font-size: 12px;
    border-collapse: collapse;
}

.direktor-preview-table-full thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 12;
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 6px 8px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.direktor-preview-table-full thead tr:first-child th:last-child {
    background: var(--success);
    font-size: 10px;
}

.direktor-preview-table-full .section-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.direktor-preview-table-full thead tr:nth-child(2) th {
    position: sticky;
    top: 29px;
    z-index: 11;
    background: var(--bg-card);
    white-space: nowrap;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 500;
    border-bottom: 2px solid var(--border);
}

.direktor-preview-table-full td {
    padding: 6px 8px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.direktor-preview-table-full tbody tr:hover {
    background: var(--bg-hover);
}

.direktor-preview-table-full th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.direktor-preview-table-full th.sortable:hover {
    background: var(--bg-hover);
}

.direktor-preview-table-full .sort-icon {
    margin-left: 2px;
    opacity: 0.4;
    font-size: 10px;
}

.direktor-preview-table-full th.sortable:hover .sort-icon {
    opacity: 1;
}

/* Cell types */
.direktor-preview-table-full .cell-small {
    white-space: nowrap;
    text-align: center;
    font-size: 11px;
}

.direktor-preview-table-full .cell-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.direktor-preview-table-full .cell-address {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--text-muted);
}

.direktor-preview-table-full .cell-city {
    white-space: nowrap;
    font-size: 11px;
}

.direktor-preview-table-full .cell-iban {
    font-family: monospace;
    font-size: 11px;
    white-space: nowrap;
    letter-spacing: -0.5px;
}

.direktor-preview-table-full .cell-ref {
    font-family: monospace;
    font-size: 10px;
    white-space: nowrap;
    color: var(--text-muted);
}

.direktor-preview-table-full .cell-amount {
    text-align: right;
    white-space: nowrap;
    font-weight: 500;
    font-family: monospace;
}

.direktor-preview-table-full .cell-desc {
    min-width: 200px;
    max-width: 350px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

.direktor-preview-table-full .cell-date {
    white-space: nowrap;
    text-align: center;
}

/* Transactions Table Full */
.direktor-transactions-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: calc(100vh - 350px);
}

.direktor-transactions-table-full {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    font-size: 12px;
    border-collapse: collapse;
}

.direktor-transactions-table-full thead tr:first-child th {
    position: sticky;
    top: 0;
    z-index: 12;
    background: var(--primary);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 6px 8px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.direktor-transactions-table-full thead tr:first-child th:first-child {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
}

.direktor-transactions-table-full thead tr:first-child th.section-header-category {
    background: var(--success);
}

.direktor-transactions-table-full .section-header {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.direktor-transactions-table-full thead tr:nth-child(2) th {
    position: sticky;
    top: 29px;
    z-index: 11;
    background: var(--bg-card);
    white-space: nowrap;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 500;
    border-bottom: 2px solid var(--border);
}

.direktor-transactions-table-full td {
    padding: 6px 8px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}

.direktor-transactions-table-full tbody tr:hover {
    background: var(--bg-hover);
}

.direktor-transactions-table-full th.sortable-col {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
    position: relative;
    padding-right: 18px !important;
}

.direktor-transactions-table-full th.sortable-col:hover {
    background: var(--bg-hover);
}

.direktor-transactions-table-full th.sortable-col::after {
    content: '⇅';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.4;
}

.direktor-transactions-table-full th.sortable-col.sort-asc::after {
    content: '▲';
    opacity: 1;
    color: var(--primary);
}

.direktor-transactions-table-full th.sortable-col.sort-desc::after {
    content: '▼';
    opacity: 1;
    color: var(--primary);
}

/* Cell types for transactions table */
.direktor-transactions-table-full .cell-small {
    white-space: nowrap;
    text-align: center;
    font-size: 11px;
}

.direktor-transactions-table-full .cell-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.direktor-transactions-table-full .cell-address {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: var(--text-muted);
}

.direktor-transactions-table-full .cell-city {
    white-space: nowrap;
    font-size: 11px;
}

.direktor-transactions-table-full .cell-iban {
    font-family: monospace;
    font-size: 11px;
    white-space: nowrap;
    letter-spacing: -0.5px;
}

.direktor-transactions-table-full .cell-ref {
    font-family: monospace;
    font-size: 10px;
    white-space: nowrap;
    color: var(--text-muted);
}

.direktor-transactions-table-full .cell-amount {
    text-align: right;
    white-space: nowrap;
    font-weight: 500;
    font-family: monospace;
}

.direktor-transactions-table-full .cell-desc {
    min-width: 200px;
    max-width: 350px;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

.direktor-transactions-table-full .cell-date {
    white-space: nowrap;
    text-align: center;
}

/* Export Page Styles */
.direktor-category-checkboxes {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: var(--bg-input);
}

.direktor-export-cat-group {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.direktor-export-cat-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.direktor-export-cat-main,
.direktor-export-cat-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
}

.direktor-export-cat-main {
    font-weight: 600;
}

.direktor-export-cat-main:hover,
.direktor-export-cat-sub:hover {
    background: var(--bg-hover);
}

.direktor-export-cat-sub {
    margin-left: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.direktor-export-cat-main input,
.direktor-export-cat-sub input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.direktor-export-cat-main .cat-icon,
.direktor-export-cat-sub .cat-icon {
    font-size: 16px;
}

.direktor-export-cat-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.direktor-form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    margin-left: 26px;
}

.export-option {
    margin-bottom: 5px;
}

.direktor-export-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.direktor-export-buttons .export-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    text-align: left;
    height: auto;
}

.direktor-export-buttons .export-icon {
    font-size: 32px;
}

.direktor-export-buttons .export-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.direktor-export-buttons .export-label strong {
    font-size: 16px;
}

.direktor-export-buttons .export-label small {
    font-size: 11px;
    opacity: 0.8;
    font-weight: normal;
}

@media (max-width: 768px) {
    .direktor-export-buttons {
        grid-template-columns: 1fr;
    }
}

/* Modal */
.direktor-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.direktor-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.direktor-modal {
    background: #1a1a2e;
    border-radius: var(--radius);
    width: 420px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
    border: 1px solid #333350;
    box-sizing: border-box;
}

.direktor-modal-backdrop.active .direktor-modal {
    transform: scale(1);
}

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

.direktor-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.direktor-modal-close {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 28px;
    padding: 0;
    line-height: 1;
}

.direktor-modal-close:hover {
    color: #fff;
}

.direktor-modal-body {
    padding: 20px;
    background: #1a1a2e;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

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

.direktor-modal-body .direktor-form-group:last-child {
    margin-bottom: 0;
}

.direktor-modal-body .direktor-form-label {
    display: block;
    margin-bottom: 8px;
    color: #a0a0b0;
    font-size: 13px;
    font-weight: 500;
}

.direktor-modal-body .direktor-form-control {
    width: 100%;
    max-width: 100%;
    padding: 10px 14px;
    border: 2px solid #333350;
    border-radius: 8px;
    background: #252540;
    color: #ffffff;
    font-size: 14px;
    box-sizing: border-box;
}

.direktor-modal-body .direktor-form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.direktor-modal-body .direktor-form-control::placeholder {
    color: #666680;
}

.direktor-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #333350;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #1a1a2e;
}

.direktor-modal-footer .direktor-btn {
    padding: 12px 24px;
    font-weight: 600;
}

.direktor-modal-footer .direktor-btn-secondary {
    background: #252540;
    color: #e0e0e0;
    border: 1px solid #333350;
}

.direktor-modal-footer .direktor-btn-secondary:hover {
    background: #2a2a45;
    color: #fff;
}

.direktor-modal-footer .direktor-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
}

/* Icon & Color Pickers */
.direktor-icon-picker,
.direktor-color-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.direktor-icon-picker {
    max-height: 130px;
    overflow-y: auto;
    padding: 5px 0;
}

.direktor-icon-option {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    background: #252540;
    transition: all 0.2s;
    flex-shrink: 0;
}

.direktor-icon-option:hover,
.direktor-icon-option.selected {
    background: #6366f1;
    transform: scale(1.05);
}

.direktor-color-picker {
    padding: 5px 0;
}

.direktor-color-option {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.direktor-color-option:hover,
.direktor-color-option.selected {
    transform: scale(1.05);
    border-color: white;
}

/* Global input fixes - ensure visibility */
.direktor-app input[type="text"],
.direktor-app input[type="password"],
.direktor-app input[type="email"],
.direktor-app input[type="date"],
.direktor-app input[type="number"],
.direktor-app textarea,
.direktor-app select {
    background: #252540 !important;
    color: #ffffff !important;
    border: 2px solid #333350 !important;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.direktor-app input:focus,
.direktor-app textarea:focus,
.direktor-app select:focus {
    outline: none;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.direktor-app input::placeholder,
.direktor-app textarea::placeholder {
    color: #666680 !important;
}

.direktor-app label {
    color: #a0a0b0;
}

/* Loading */
.direktor-loading {
    text-align: center;
    padding: 40px;
}

.direktor-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

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

/* Toast */
.direktor-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 16px 28px;
    background: #1a1a2e;
    border: 1px solid #333350;
    border-radius: 12px;
    color: #fff;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    transition: transform 0.4s ease;
    font-weight: 500;
}

.direktor-toast.show {
    transform: translateX(-50%) translateY(0);
}

.direktor-toast.success {
    border-left: 4px solid #22c55e;
    background: linear-gradient(135deg, #1a2e1a 0%, #1a1a2e 100%);
}

.direktor-toast.error {
    border-left: 4px solid #ef4444;
    background: linear-gradient(135deg, #2e1a1a 0%, #1a1a2e 100%);
}

.direktor-toast-icon {
    font-size: 20px;
}

.direktor-toast.success .direktor-toast-icon { color: #22c55e; }
.direktor-toast.error .direktor-toast-icon { color: #ef4444; }

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .direktor-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .direktor-sidebar {
        transform: translateX(-100%);
    }

    .direktor-sidebar.active {
        transform: translateX(0);
    }

    .direktor-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .direktor-main {
        margin-left: 0;
        padding: 70px 15px 30px;
    }

    .direktor-filters {
        flex-direction: column;
    }

    .direktor-filter-group {
        width: 100%;
    }

    .direktor-filter-group input,
    .direktor-filter-group select {
        width: 100%;
    }

    .direktor-category-actions {
        flex-wrap: wrap;
    }

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

    .direktor-bulk-actions {
        flex-wrap: wrap;
    }

    .direktor-login-box {
        padding: 30px 25px;
    }
}


/* ==========================================
   GHOST EASTER EGG
   ========================================== */

#ghost-easter-egg {
    text-align: center;
    padding: 30px 15px 0;
    pointer-events: none;
    flex-shrink: 0;
}

#ghost-easter-egg img {
    max-width: 100%;
    max-height: 120px;
    opacity: 0;
    transition: opacity 3s ease-in-out;
}

#ghost-easter-egg img.ghost-visible {
    opacity: 0.8;
}
