/* ============================================
   CSS Variables & Theme Configuration
   ============================================
   Change these variables to customize colors and spacing:
   --bg: main background color
   --sidebar-bg: sidebar background (light warm gray)
   --accent-black: primary black for buttons and text
   --muted: muted text color for subtitles
   --card-shadow: soft shadow for cards and buttons
   --radius-lg: standard border radius for cards (20px)
   --radius-xl: large border radius for big containers (28px)
   --gap: consistent spacing unit (24px)
   
   Responsive breakpoints:
   - Desktop: min-width 1024px
   - Tablet: 768px - 1023px
   - Mobile: < 768px
*/

:root {
    --bg: #ffffff;
    --sidebar-bg: #e9e9ea;
    --accent-black: #0b0b0b;
    --muted: #9b9b9b;
    --card-shadow: 0 6px 18px rgba(3, 17, 70, 0.05);
    --radius-lg: 20px;
    --radius-xl: 28px;
    --gap: 24px;
    --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    --font-serif: "Playfair Display", Georgia, serif;

    /* Card colors - matching mockup exactly */
    --card-yellow: #e7a400;
    --card-black: #000000;
    --card-blue: #1826ff;
    --card-gray: #8a8a8a;
    --card-red: #e13a3a;
    --card-green: #199131;

    /* Login gradient colors */
    --login-gradient-start: #ff4b6e;
    --login-gradient-end: #2d0a4b;
}

/* ============================================
   Global Reset & Base Styles
   ============================================ */

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--accent-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Dashboard Layout - Two Column
   ============================================ */

.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg);
    padding: 20px;
    gap: var(--gap);
}

/* ============================================
   Sidebar - Fixed width on desktop
   ============================================ */

.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-radius: 18px;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Logo area */
.logo-area {
    text-align: center;
    margin-bottom: 48px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-mjm {
    font-family: var(--font-serif);
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-black);
    line-height: 1;
}

.logo-tagline {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 1.5px;
    color: var(--accent-black);
    margin-top: 4px;
    text-transform: uppercase;
}

/* Navigation */
.nav {
    flex: 1;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.nav-item.active {
    background-color: #ffffff;
    color: var(--accent-black);
    box-shadow: var(--card-shadow);
    font-weight: 600;
}

.nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nav-label {
    flex: 1;
}

/* Sidebar footer */
.sidebar-footer {
    margin-top: auto;
    text-align: center;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    padding: 8px;
    font-family: var(--font-sans);
}

.logout-btn:hover {
    color: var(--accent-black);
}

.sidebar-tagline {
    font-size: 11px;
    color: var(--muted);
    margin-top: 12px;
    font-weight: 300;
}

/* ============================================
   Main Content Area
   ============================================ */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    overflow-x: hidden;
}

/* Header with greeting */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
}

.greeting-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.greeting-text {
    display: flex;
    flex-direction: column;
}

.greeting-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-black);
    line-height: 1.2;
}

.greeting-subtitle {
    font-size: 14px;
    color: var(--muted);
    font-weight: 400;
    margin-top: 4px;
}

.notification-btn {
    width: 48px;
    height: 48px;
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--card-shadow);
}

.notification-btn:hover {
    background-color: #f8f8f8;
}

.notification-btn svg {
    color: var(--accent-black);
}

/* ============================================
   Content Sections
   ============================================ */

.content-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--accent-black);
}

/* Cards row */
.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.cards-row-orders {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Stat cards */
.stat-card {
    background-color: var(--card-black);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
    min-height: 110px;
    color: #ffffff;
    transition: transform 0.2s ease;
}

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

.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-icon {
    width: 28px;
    height: 28px;
    stroke: currentColor;
}

.card-label {
    font-size: 16px;
    font-weight: 400;
}

.card-value {
    font-size: 22px;
    font-weight: 700;
    align-self: flex-end;
}

.card-action-btn {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.card-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.card-action-btn svg {
    color: #ffffff;
}

/* Card color variants */
.card-yellow {
    background-color: var(--card-yellow);
    color: #ffffff;
}

.card-black {
    background-color: var(--card-black);
}

.card-blue {
    background-color: var(--card-blue);
}

.card-gray {
    background-color: var(--card-gray);
}

.card-red {
    background-color: var(--card-red);
}

.card-green {
    background-color: var(--card-green);
}

/* ============================================
   Filter Pills
   ============================================ */

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.pill {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #ededed;
    color: var(--muted);
    border: none;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.pill:hover {
    background-color: #e0e0e0;
}

.pill-active {
    background-color: var(--accent-black);
    color: #ffffff;
}

/* ============================================
   Data Table
   ============================================ */

.data-table-container {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

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

.data-table thead {
    background-color: #fafafa;
}

.data-table th {
    text-align: left;
    padding: 20px 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table th.text-right {
    text-align: right;
}

.data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table td {
    padding: 24px 28px;
    font-size: 15px;
    color: var(--accent-black);
}

.name-cell {
    font-weight: 600;
}

.date-cell {
    color: var(--muted);
}

.contact-cell {
    color: var(--accent-black);
}

.text-right {
    text-align: right;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
}

.status-new-order {
    background-color: var(--card-green);
}

.status-cutting {
    background-color: var(--card-yellow);
}

.status-ready {
    background-color: var(--card-blue);
}

/* View button */
.view-btn {
    padding: 8px 24px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: transparent;
    color: var(--accent-black);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.view-btn:hover {
    background-color: #f8f8f8;
    border-color: var(--accent-black);
}

/* ============================================
   Login Layout - Centered Card
   ============================================ */

.login-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg);
    padding: 20px;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1000px;
    width: 100%;
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(3, 17, 70, 0.08);
}


/* Decorative wave pattern */
.login-visual::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 400px;
    background: radial-gradient(
            ellipse 800px 400px at 50% 100%,
            rgba(255, 255, 255, 0.08) 0%,
            transparent 50%
        ),
        radial-gradient(
            ellipse 600px 300px at 20% 80%,
            rgba(0, 0, 0, 0.15) 0%,
            transparent 60%
        ),
        radial-gradient(
            ellipse 500px 250px at 80% 90%,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 50%
        );
    pointer-events: none;
}

.login-visual-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo .logo-mjm {
    font-family: var(--font-serif);
    font-size: 64px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #ffffff;
    line-height: 1;
}

.login-logo .logo-tagline {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 2px;
    color: #ffffff;
    margin-top: 8px;
    text-transform: uppercase;
}


.login-tagline {
    font-size: 24px;
    font-weight: 300;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
}

.login-signature {
    font-family: "Brush Script MT", cursive;
    font-size: 48px;
    font-weight: 400;
    color: #ffffff;
    margin: 0;
    font-style: italic;
}

/* Form pane */
.login-form-pane {
    padding: 60px 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
}

.login-form {
    width: 100%;
    max-width: 400px;
}

.login-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-black);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 32px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: var(--accent-black);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 60px;
    padding: 20px;
    background-color: #efefef;
    border: none;
    border-radius: 18px;
    font-size: 15px;
    font-family: var(--font-sans);
    color: var(--accent-black);
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: #bdbdbd;
}

.form-input:focus {
    outline: none;
    background-color: #e8e8e8;
}

.form-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    border: 2px solid #d0d0d0;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 10px;
}

.checkbox-label {
    font-size: 14px;
    color: var(--accent-black);
    cursor: pointer;
}

.login-btn {
    width: 100%;
    height: 64px;
    background-color: var(--accent-black);
    color: #ffffff;
    border: none;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-sans);
}

.login-btn:hover {
    background-color: #2a2a2a;
}

.forgot-password {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
}

.forgot-password:hover {
    color: var(--accent-black);
}
/* Add to styles.css - Mobile Sidebar Toggle Styles */

/* Sidebar toggle button - only visible on mobile/tablet */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background-color: var(--accent-black);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: var(--card-shadow);
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: #2a2a2a;
}

/* Show toggle button on mobile/tablet */
@media (max-width: 1023px) {
    .sidebar-toggle {
        display: flex;
    }

    /* Hide sidebar by default on mobile */
    @media (max-width: 767px) {
        .sidebar {
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            z-index: 999;
            transform: translateX(-100%);
            transition: transform 0.3s ease;
            width: 280px;
            border-radius: 0 18px 18px 0;
        }

        .sidebar.sidebar-visible {
            transform: translateX(0);
        }

        /* Overlay when sidebar is open */
        body.sidebar-open::before {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 998;
            animation: fadeIn 0.3s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
    }
}

/* ============================================
   Responsive Styles
   ============================================ */

/* Tablet - 768px to 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    .sidebar {
        width: 80px;
        padding: 32px 12px;
    }

    .logo-tagline {
        display: none;
    }

    .logo-mjm {
        font-size: 32px;
    }

    .nav-label {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 16px;
    }

    .sidebar-footer {
        display: none;
    }

    .greeting-title {
        font-size: clamp(20px, 3vw, 28px);
    }

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

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

/* Mobile - < 768px */
@media (max-width: 767px) {
    .dashboard-layout {
        flex-direction: column;
        padding: 16px;
        gap: 16px;
    }

    .sidebar {
        width: 100%;
        padding: 20px 16px;
    }

    .logo-mjm {
        font-size: 36px;
    }

    .logo-tagline {
        font-size: 9px;
    }

    .nav-list {
        flex-direction: row;
        overflow-x: auto;
        gap: 12px;
    }

    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 12px;
        min-width: 80px;
        height: auto;
    }

    .nav-label {
        font-size: 12px;
    }

    .sidebar-footer {
        margin-top: 20px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .greeting-section {
        width: 100%;
    }

    .greeting-title {
        font-size: clamp(18px, 4vw, 24px);
    }

    .greeting-subtitle {
        font-size: 13px;
    }

    .notification-btn {
        align-self: flex-end;
    }

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

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

    .data-table-container {
        overflow-x: auto;
    }

    .data-table th,
    .data-table td {
        padding: 16px 20px;
        font-size: 13px;
    }

    /* Login mobile layout */
    .login-container {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 300px;
        padding: 40px 32px;
        border-radius: 18px 18px 0 0;
    }

    .login-logo .logo-mjm {
        font-size: 48px;
    }

    .login-tagline {
        font-size: 18px;
    }

    .login-signature {
        font-size: 36px;
    }

    .login-form-pane {
        padding: 40px 32px;
    }

    .login-title {
        font-size: 28px;
    }

    .form-input {
        height: 56px;
        padding: 16px;
    }

    .login-btn {
        height: 56px;
    }
}

/* Extra small mobile - < 375px */
@media (max-width: 374px) {
    .greeting-title {
        font-size: 16px;
    }

    .card-label {
        font-size: 14px;
    }

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

    .filter-pills {
        gap: 8px;
    }

    .pill {
        font-size: 12px;
        padding: 8px 16px;
    }
}
