/*
|--------------------------------------------------------------------------
| Store360 - Common UI
|--------------------------------------------------------------------------
| Common visual styles for the Store360 application.
| Page-specific functionality should remain in the Blade/JS files.
|--------------------------------------------------------------------------
*/

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --dark: #0f172a;
    --text: #1e293b;
    --muted: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --white: #ffffff;
    --success: #16a34a;
    --warning: #d97706;
}


/* ==========================================================================
   GLOBAL
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background: var(--light);
    color: var(--text);
}

a {
    text-decoration: none;
}


/* ==========================================================================
   WELCOME / PUBLIC NAVBAR
   ========================================================================== */

.navbar {
    min-height: 70px;
    padding: 14px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    background: var(--dark);
    color: var(--white);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}

.brand-icon img {
    width: 42px;
    height: 42px;

    object-fit: contain;
    display: block;
}

.brand-name {
    font-size: 19px;
    font-weight: 700;
}

.brand-subtitle {
    display: block;
    margin-top: 2px;

    color: #94a3b8;
    font-size: 11px;
    letter-spacing: .8px;
    text-transform: uppercase;
}

.nav-link {
    padding: 9px 15px;

    border-radius: 7px;

    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;

    transition:
        background-color .2s ease,
        color .2s ease;
}

.nav-link:hover {
    background: #1e293b;
}

.nav-primary {
    background: var(--primary);
    color: var(--white);
}

.nav-primary:hover {
    background: var(--primary-dark);
}


/* ==========================================================================
   WELCOME / HERO
   ========================================================================== */

.hero {
    width: min(1120px, 90%);
    margin: 70px auto 55px;

    display: grid;
    grid-template-columns: 1.15fr .85fr;

    gap: 70px;
    align-items: center;
}

.eyebrow {
    display: inline-block;

    margin-bottom: 18px;
    padding: 7px 11px;

    border: 1px solid #bfdbfe;
    border-radius: 6px;

    background: #eff6ff;
    color: var(--primary-dark);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 20px;

    color: var(--dark);
    font-size: clamp(38px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -1.8px;
}

h1 span {
    color: var(--primary);
}

.hero p {
    max-width: 620px;
    margin: 0 0 28px;

    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    min-height: 46px;
    padding: 11px 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    border-radius: 7px;

    font-size: 14px;
    font-weight: 700;

    transition:
        background-color .2s ease,
        border-color .2s ease,
        opacity .2s ease;
}

.button-primary {
    background: var(--primary);
    color: var(--white);
}

.button-primary:hover {
    background: var(--primary-dark);
}

.button-secondary {
    background: var(--white);
    color: var(--dark);

    border: 1px solid var(--border);
}

.button-secondary:hover {
    background: #f1f5f9;
}


/* ==========================================================================
   SYSTEM CARD
   ========================================================================== */

.system-card {
    padding: 28px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.system-card h2 {
    margin: 0 0 6px;

    color: var(--dark);
    font-size: 21px;
}

.system-card > p {
    margin: 0 0 22px;

    color: var(--muted);
    font-size: 13px;
}


/* ==========================================================================
   FEATURES
   ========================================================================== */

.feature {
    display: flex;
    align-items: flex-start;

    gap: 12px;
    padding: 13px 0;

    border-bottom: 1px solid #f1f5f9;
}

.feature:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.feature-icon {
    width: 32px;
    height: 32px;

    flex: 0 0 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #eff6ff;
    color: var(--primary);

    font-size: 14px;
    font-weight: 800;
}

.feature strong {
    display: block;

    color: var(--dark);
    font-size: 14px;
}

.feature small {
    display: block;

    margin-top: 3px;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}


/* ==========================================================================
   MODULES
   ========================================================================== */

.modules {
    width: min(1120px, 90%);
    margin: 0 auto 65px;
}

.section-title {
    margin-bottom: 20px;
}

.section-title h2 {
    margin: 0 0 5px;

    color: var(--dark);
    font-size: 24px;
}

.section-title p {
    margin: 0;

    color: var(--muted);
    font-size: 14px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.module {
    padding: 20px;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 11px;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.module:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}

.module-icon {
    width: 40px;
    height: 40px;

    margin-bottom: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: #eff6ff;
    color: var(--primary);

    font-size: 18px;
    font-weight: 700;
}

.module h3 {
    margin: 0 0 7px;

    color: var(--dark);
    font-size: 15px;
}

.module p {
    margin: 0;

    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    padding: 25px 20px;

    border-top: 1px solid var(--border);

    background: var(--white);
    color: var(--muted);

    text-align: center;
    font-size: 12px;
}

.footer strong {
    color: var(--dark);
}


/* ==========================================================================
   DASHBOARD
   ========================================================================== */

.dashboard-title {
    font-weight: 700;
    letter-spacing: -0.3px;
}

.dashboard-subtitle {
    color: var(--muted);
    font-size: 14px;
}

.dashboard-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.dashboard-card .card-body {
    padding: 22px;
}

.dashboard-card .card-header {
    background: var(--white);
    border-bottom: 1px solid #eee;
    padding: 18px 20px;
}

.dashboard-card .card-header h5 {
    margin: 0;
    font-weight: 700;
}

.dashboard-filter-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
}

.dashboard-filter-card label {
    font-size: 13px;
    font-weight: 600;
}

.dashboard-filter-card .form-select:focus,
.dashboard-filter-card .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .15);
}

.sales-card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.sales-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.11);
}

.sales-card .card-body {
    padding: 22px;
}

.sales-card-member { border-top: 4px solid #6f42c1; }
.sales-card-retail { border-top: 4px solid var(--success); }
.sales-card-total { border-top: 4px solid var(--primary); }

.stat-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 750;
    margin-top: 5px;
}

.stat-small {
    color: var(--muted);
    font-size: 13px;
    margin-top: 3px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.icon-member { background: #eee9ff; color: #6f42c1; }
.icon-retail { background: #e8f7ee; color: var(--success); }
.icon-total { background: #e7f1ff; color: var(--primary); }

.dashboard-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 3px;
}

.dashboard-section-subtitle {
    font-size: 13px;
    color: var(--muted);
}

.simple-stat {
    border-radius: 14px;
    background: #f8f9fa;
    padding: 20px;
    height: 100%;
}

.simple-stat-stock { border-left: 4px solid #fd7e14; }
.simple-stat-out { border-left: 4px solid #dc3545; }
.simple-stat-purchase { border-left: 4px solid #fd7e14; }
.simple-stat-net { border-left: 4px solid #0f9d9a; }

.simple-value {
    font-size: 26px;
    font-weight: 750;
    margin-top: 4px;
}

.simple-label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.chart-container {
    position: relative;
    height: 340px;
}

.analytics-chart-container {
    position: relative;
    height: 320px;
}

.summary-box {
    border-radius: 14px;
    background: #f8f9fa;
    padding: 18px;
    margin-bottom: 12px;
}

.summary-box:last-child { margin-bottom: 0; }

.summary-box .summary-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: .4px;
}

.summary-box .summary-value {
    font-size: 22px;
    font-weight: 750;
    margin-top: 3px;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-actions a { text-decoration: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 767px) {
    .stat-value { font-size: 23px; }

    .chart-container,
    .analytics-chart-container {
        height: 280px;
    }
}

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr;
        gap: 35px;
        margin-top: 45px;
    }

    .module-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 600px) {

    .navbar {
        padding: 13px 5%;
    }

    .hero,
    .modules {
        width: 90%;
    }

    .hero {
        margin-top: 35px;
    }

    h1 {
        letter-spacing: -1px;
    }

    .buttons {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Store360 Login
   ========================================================= */

.store360-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8fafc;
}

.store360-login-card {
    width: 100%;
    max-width: 440px;
    padding: 42px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

/* Brand */

.store360-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}

.store360-login-logo {
    width: 78px;
    height: 78px;

    display: block;
    flex-shrink: 0;

    object-fit: contain;

    border-radius: 10px;
}


.store360-login-brand-name {
    color: #0f172a;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.store360-login-brand-name span {
    color: #2563eb;
}

.store360-login-brand-tagline {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

/* Heading */

.store360-login-heading {
    margin-bottom: 28px;
}

.store360-login-heading h1 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.store360-login-heading p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* Form */

.store360-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.store360-login-field {
    position: relative;
}

.store360-password-field {
    position: relative;
}

.store360-forgot-password {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 13px;
}

/* Remember */

.store360-login-remember {
    margin-top: -2px;
}

/* Button */

.store360-login-button {
    width: 100%;
    min-height: 46px;
    margin-top: 2px;
}

/* Footer */

.store360-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    margin-top: 30px;
    padding-top: 22px;

    border-top: 1px solid #e2e8f0;

    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

.store360-login-footer-dot {
    color: #cbd5e1;
}

/* Session message */

.store360-login-status {
    margin-bottom: 20px;
}

/* Mobile */

@media (max-width: 640px) {

    .store360-login {
        padding: 20px 15px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .store360-login-card {
        padding: 30px 24px;
        border-radius: 14px;
    }

    .store360-login-brand {
        margin-bottom: 30px;
    }

    .store360-login-heading h1 {
        font-size: 25px;
    }

    .store360-login-footer {
        flex-wrap: wrap;
    }
}

