/* ==========================================================================
   Lürssen Werft - Premium Dashboard Styles (Vanilla CSS)
   ========================================================================== */

   :root {
    /* Maritime Dark Theme Palette */
    --bg-dark: #0a0e17;
    --bg-panel: rgba(18, 25, 40, 0.65);
    --bg-panel-hover: rgba(25, 35, 55, 0.8);
    --border-glass: rgba(255, 255, 255, 0.08);
    
    --primary-blue: #0066ff;
    --primary-hover: #0052cc;
    --accent-teal: #00e5ff;
    --danger-red: #ff3366;
    --success-green: #00cc88;
    --warning-orange: #ffaa00;

    --text-main: #f0f4f8;
    --text-muted: #8b9bb4;
    
    --font-stack: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-stack);
    background-color: var(--bg-dark);
    background-image: 
        linear-gradient(to bottom, rgba(10, 14, 23, 0.7), rgba(10, 14, 23, 0.9)),
        url('bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Layout */
.dashboard {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(10, 14, 23, 0.95);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: all 0.3s ease;
}

.logo-container {
    margin-bottom: 40px;
}

.logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-teal));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.logo-container h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo-container .subtitle {
    font-size: 12px;
    color: var(--accent-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(0, 102, 255, 0.15);
    color: var(--accent-teal);
    border-left: 3px solid var(--accent-teal);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border-glass);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px 48px;
    overflow-y: auto;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    padding: 10px 16px;
    border-radius: 20px;
    width: 400px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    width: 100%;
    outline: none;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-icon {
    background: var(--bg-panel);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 10px;
    border-radius: 12px;
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--danger-red);
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--bg-panel-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.05);
}

.stat-icon.blue { color: var(--primary-blue); background: rgba(0, 102, 255, 0.1); }
.stat-icon.green { color: var(--success-green); background: rgba(0, 204, 136, 0.1); }
.stat-icon.red { color: var(--danger-red); background: rgba(255, 51, 102, 0.1); }

.stat-details h3 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 12px;
    color: var(--danger-red);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 3px;
}

.progress.green-bg {
    background: var(--success-green);
}

/* Data Table */
.table-container {
    padding: 24px;
}

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

.table-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.table-filters {
    display: flex;
    gap: 12px;
}

.filter-select {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}

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

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

.data-table th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

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

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-in_progress {
    background: rgba(0, 102, 255, 0.15);
    color: #4da6ff;
    border: 1px solid rgba(0, 102, 255, 0.3);
}

.status-qa_review {
    background: rgba(255, 170, 0, 0.15);
    color: #ffcc66;
    border: 1px solid rgba(255, 170, 0, 0.3);
}

.label-overdue {
    color: var(--danger-red);
    font-weight: 600;
}

.label-imminent {
    color: var(--warning-orange);
}

/* Action Button */
.btn-action {
    background: transparent;
    border: 1px solid var(--accent-teal);
    color: var(--accent-teal);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: var(--accent-teal);
    color: var(--bg-dark);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass);
    border-left: 4px solid var(--success-green);
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

/* SPA View Sections */
.view-section {
    display: none;
}

.view-section.active {
    display: block;
    animation: fadeIn 0.3s ease-out forwards;
}

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--bg-panel);
    width: 400px;
    padding: 30px;
    border-radius: 12px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal.hidden .modal-content {
    transform: translateY(-20px);
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

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

.close-btn:hover {
    color: var(--text-main);
}

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary-blue);
}
