/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0EA5E9;
    --primary-dark: #0284C7;
    --bg-dark: #0B1426;
    --bg-light: #f8fafc;
    --text-dark: #0B1426;
    --text-light: #475569;
    --border: #e2e8f0;
    --danger: #ef4444;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* App Wrapper */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
}

/* Navigation Bar */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 16px;
}

.navbar-brand {
    flex: 1;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--bg-dark);
    margin: 0;
}

.navbar-menu {
    position: relative;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--bg-light);
    color: var(--primary);
}

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

.nav-link.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.role-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-owner {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.badge-ops {
    background: rgba(14, 165, 233, 0.1);
    color: #0c4a6e;
}

.badge-design {
    background: rgba(167, 139, 250, 0.1);
    color: #553399;
}

/* Bottom Navigation (Mobile) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    height: 70px;
    z-index: 100;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 8px;
}

.bottom-nav-item:hover {
    color: var(--primary);
}

.bottom-nav-item .icon {
    font-size: 24px;
}

.bottom-nav-item .label {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: white;
        border: 1px solid var(--border);
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        min-width: 200px;
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-link {
        padding: 12px 16px;
        border-radius: 0;
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .main-content {
        padding-bottom: 80px;
    }

    .bottom-nav {
        display: flex;
    }
}

/* Flash Messages */
.flash-message {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
    padding: 12px 16px;
    margin: 16px;
    border-radius: 8px;
    border-left: 4px solid #22c55e;
    font-size: 14px;
}

/* Global Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-body {
    padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Forms */
input, select, textarea {
    font-family: inherit;
    border-radius: 6px;
    border: 1px solid var(--border);
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

button {
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Utility Classes */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: flex !important;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
