/* common.css - Shared layout styles for all pages */

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: #0f0f1a;
    color: #e8e8f0;
    min-height: 100vh;
}

body.theme-light { background: #f5f6fa; color: #1a1a2e; }

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.header-brand svg { width: 28px; height: 28px; }

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
    color: white;
}

.user-menu:hover { background: rgba(255,255,255,0.15); }

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1a1a2e;
    border: 1px solid #2a2a45;
    border-radius: 12px;
    min-width: 220px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none;
    z-index: 200;
    overflow: hidden;
}

body.theme-light .user-dropdown { background: #ffffff; border-color: #e0e0e8; }
.user-dropdown.show { display: block; }

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #e8e8f0;
    text-decoration: none;
    transition: background 0.15s;
}

body.theme-light .user-dropdown a { color: #1a1a2e; }
.user-dropdown a:hover { background: #252540; }
body.theme-light .user-dropdown a:hover { background: #f0f0f5; }
.user-dropdown a.danger { color: #ef4444; }
.user-dropdown .divider { height: 1px; background: #2a2a45; margin: 4px 0; }
body.theme-light .user-dropdown .divider { background: #e0e0e8; }

.nav {
    background: #1a1a2e;
    padding: 12px 24px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #2a2a45;
    flex-wrap: wrap;
}

body.theme-light .nav { background: #ffffff; border-color: #e0e0e8; }

.nav a {
    padding: 10px 18px;
    background: #252540;
    color: #a8a8c0;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

body.theme-light .nav a { background: #f0f0f5; color: #4a4a68; }
.nav a:hover { background: #2a2a48; color: #e8e8f0; }
body.theme-light .nav a:hover { background: #e8eaed; color: #1a1a2e; }
.nav a.active { background: #667eea; color: white; }
.nav a.hidden { display: none; }
