/**
 * OrchestCTR - Layout
 * Header, Footer, Navigation, Container-Strukturen
 *
 * Load Order: 2nd (nach core.css, vor components.css)
 */

/* ========================================
   Logo & Branding
   ======================================== */

.site-logo {
    height: 250px;
    margin: 0 auto;
    display: block;
}

/* ========================================
   Container & Wrapper
   ======================================== */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-5);
}

.dashboard-content {
    width: 100%;
}

.content-section {
    background: var(--color-bg-white);
    padding: var(--space-7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.content-section h2 {
    margin-bottom: var(--space-6);
    color: var(--color-text-dark);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--color-primary);
}

.content-section h3 {
    margin-bottom: var(--space-4);
    color: var(--color-text-dark);
    font-size: var(--font-size-lg);
}

/* Apps Landing Container */
.apps-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-5);
}

.apps-header {
    background: var(--color-bg-white);
    padding: var(--space-5) var(--space-5);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--space-8);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.apps-header p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 1.1em;
}

/* ========================================
   Dashboard Header
   ======================================== */

.dashboard-header {
    background: var(--color-bg-white);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.dashboard-header a:hover {
    color: var(--color-primary-hover);
}

.dashboard-header a:visited {
    color: var(--color-primary);
}

.dashboard-logo {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.dashboard-logo img {
    height: 100px;
    width: auto;
}

.dashboard-logo h1 {
    margin: 0;
    color: var(--color-text-dark);
    font-size: var(--font-size-xl);
}

/* User Info Box */
.user-info {
    text-align: right;
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xs);
}

.user-info a {
    color: var(--color-primary);
    text-decoration: none;
    margin-left: var(--space-4);
}

.user-info a:hover {
    text-decoration: underline;
}

/* ========================================
   Navigation
   ======================================== */

.dashboard-nav {
    background: var(--color-bg-white);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.dashboard-nav a {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    margin-right: var(--space-2);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-base);
}

.dashboard-nav a:hover {
    background-color: var(--color-bg-light);
}

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

/* ========================================
   Footer
   ======================================== */

.dashboard-footer {
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border-medium);
    margin-top: var(--space-9);
    padding: var(--space-7) var(--space-5);
    text-align: center;
    color: var(--color-text-light);
    font-size: 0.9em;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: var(--space-4);
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    margin: 0 var(--space-2);
    transition: color var(--transition-base);
}

.footer-links a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.footer-separator {
    color: var(--color-border-medium);
    margin: 0 var(--space-1);
}

.footer-copyright {
    color: var(--color-text-light);
    font-size: 0.95em;
}

/* ========================================
   Login Page Layout
   ======================================== */

.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: var(--space-8);
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.login-logo {
    text-align: center;
    margin-bottom: var(--space-5);
}

.login-logo img {
    max-width: 200px;
    width: 200px;
    height: auto;
}

.login-container h1 {
    text-align: center;
    color: var(--color-text-dark);
    margin-bottom: var(--space-2);
}

.login-container h2 {
    text-align: center;
    font-size: var(--font-size-base);
    color: var(--color-text-light);
    margin-bottom: var(--space-7);
    font-weight: var(--font-weight-normal);
}

.login-container button[type="submit"] {
    width: 100%;
}

/* ========================================
   Account Settings Layout
   ======================================== */

.account-section {
    margin-bottom: var(--space-8);
    padding: var(--space-5);
    background-color: var(--color-bg-light);
    border-radius: var(--radius-lg);
}

.account-section:last-child {
    margin-bottom: 0;
}

/* ========================================
   Grid Layouts
   ======================================== */

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-7);
    margin-top: var(--space-7);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-5);
}

/* ========================================
   Card Content Layouts
   ======================================== */

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
}

.card-header h2,
.card-header h3 {
    margin: 0;
}

/* ========================================
   Empty State Layout
   ======================================== */

.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-5);
    color: var(--color-text-muted);
}

.empty-state h3 {
    margin-bottom: var(--space-2);
    color: var(--color-text-muted);
}

.empty-state p {
    margin: 0 0 var(--space-7) 0;
    color: var(--color-text-light);
}

/* ========================================
   Section Description Text
   ======================================== */

.section-description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-5);
}

/* ========================================
   Stats Header Layout
   ======================================== */

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-header-info h2 {
    color: var(--color-bg-white);
    margin-bottom: var(--space-2);
}

.stats-header-info p {
    margin: var(--space-1) 0;
    opacity: 0.75;
}

.stats-header-metrics {
    text-align: right;
}

.stats-metric-label {
    font-size: var(--font-size-sm);
    opacity: 0.75;
    margin-bottom: var(--space-2);
}

.stats-grid {
    display: flex;
    gap: var(--space-5);
    margin-bottom: var(--space-4);
}

.stat-value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
}

.stat-label {
    font-size: var(--font-size-xs);
    opacity: 0.75;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .dashboard-logo {
        flex-direction: column;
    }

    .apps-grid,
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .user-info {
        text-align: center;
    }

    .user-info a {
        display: block;
        margin: var(--space-2) 0;
    }
}

@media (max-width: 576px) {
    .dashboard-container {
        padding: var(--space-3);
    }

    .apps-container {
        padding: var(--space-4) var(--space-3);
    }

    .login-container {
        margin: var(--space-5) auto;
        padding: var(--space-5);
    }

    .site-logo {
        height: 150px;
    }
}
