:root {
    --neon-green: #00ff9d;
    --dark-green: #004d2f;
    --dark-bg: #0a0f0c;
    --card-bg: #1a231d;
    --border-glow: 0 0 10px rgba(0, 255, 157, 0.2);
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    color: #ffffff;
    font-family: 'Segoe UI', Arial, sans-serif;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 250px;
    background: var(--card-bg);
    height: 100vh;
    position: fixed;
    padding: 20px;
    box-sizing: border-box;
}

.logo {
    color: var(--neon-green);
    font-size: 24px;
    margin-bottom: 30px;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    margin-bottom: 15px;
}

.nav-links .divider {
    height: 1px;
    background: rgba(0, 255, 157, 0.2);
    margin: 10px 0;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: 0.3s;
    display: block;
    padding: 10px;
    border-radius: 6px;
}

.nav-links a:hover {
    background: rgba(0, 255, 157, 0.1);
    color: var(--neon-green);
}

.logout-btn {
    display: block;
    width: calc(100% - 20px);
    padding: 0.75rem;
    background: var(--neon-green);
    color: black;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
    margin: 1rem 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

main {
    margin-left: 250px;
    padding: 40px;
    width: calc(100% - 250px);
    box-sizing: border-box;
    min-height: 100vh;
}

.form-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 157, 0.2);
    box-shadow: var(--border-glow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    justify-content: space-between;
}

.card:hover {
    transform: translateY(-5px);
}

.card h2 {
    color: var(--neon-green);
    margin: 0 0 15px 0;
}

.card p {
    margin: 0;
    opacity: 0.8;
}

.start-button {
    display: block;
    width: fit-content;
    margin: 20px auto 0;
    padding: 12px 25px;
    background: var(--neon-green);
    color: black;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: 0.3s;
    text-align: center;
}

.start-button:hover {
    background: #fff;
    transform: translateY(-2px);
}

.mobile-only {
    display: none;
}

/* Mobile menu toggle - hidden on desktop */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        background: rgba(26, 35, 29, 0.98);
        backdrop-filter: blur(10px);
        padding: 20px;
        box-sizing: border-box;
        overflow-y: auto;
        border-right: 2px solid var(--neon-green);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    }

    main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 20px !important;
        padding-top: 70px !important; /* Space for menu toggle */
        box-sizing: border-box;
    }

    .menu-toggle {
        display: flex;
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 1001;
        background: var(--neon-green);
        border: none;
        color: black;
        width: 45px;
        height: 45px;
        border-radius: 8px;
        font-size: 20px;
        font-weight: bold;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 255, 157, 0.3);
        transition: all 0.2s ease;
        /* Ensure proper touch target */
        touch-action: manipulation;
    }

    .menu-toggle:hover {
        background: #fff;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 255, 157, 0.4);
    }

    .menu-toggle:active {
        transform: scale(0.95);
    }

    /* Add overlay when menu is open */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 280px;
        width: calc(100vw - 280px);
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* Fix form layout on mobile */
    .form-group {
        margin-bottom: 15px;
    }

    input, select, textarea {
        width: 100% !important;
        box-sizing: border-box;
        min-height: 44px; /* Better touch targets */
    }

    .buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .buttons button {
        width: 100%;
        min-height: 44px;
    }

    /* Fix card layout */
    .form-cards {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 15px;
    }

    .card {
        margin: 0;
        padding: 20px;
    }

    /* Fix table layout */
    .items-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .items-table td, .items-table th {
        min-width: 100px;
        white-space: normal;
        word-break: break-word;
    }

    /* Fix modal layout */
    .modal-content {
        width: 90%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
        padding: 15px;
    }

    /* Fix navigation controls */
    .navigation-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 10px;
    }

    .navigation-controls button {
        min-width: 100px;
        min-height: 44px;
    }
}

/* Tablet improvements */
@media (min-width: 769px) and (max-width: 1024px) {
    main {
        margin-left: 250px;
        padding: 30px;
    }

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

/* Ensure touch targets are large enough */
@media (hover: none) {
    button, 
    .nav-links a,
    input[type="submit"],
    select {
        min-height: 44px;
        padding: 12px 20px;
    }

    .nav-links li {
        margin-bottom: 10px;
    }
}

/* Fix iOS height issues */
@supports (-webkit-touch-callout: none) {
    .sidebar,
    .modal,
    .modal-content {
        height: -webkit-fill-available;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card,
    .sidebar,
    input,
    select,
    textarea {
        border-width: 0.5px;
    }
}

/* Landscape mode adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        overflow-y: auto;
        padding-bottom: 20px;
    }

    .modal-content {
        max-height: 85vh;
        margin: 10px auto;
    }
}

@media (min-width: 480px) {
    .start-button {
        width: auto;
        display: block;
        text-align: center;
        padding: 15px;
    }

    .card {
        min-height: 180px;
        padding: 20px;
    }

    .card h2 {
        font-size: 20px;
    }
}

@media (min-width: 1025px) {
    .form-cards {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 30px;
    }
} 