
/* =====================================================
   GUARDIAN PRICE CHECK
   PREMIUM DESIGN SYSTEM
===================================================== */

:root {
    --primary: #087443;
    --primary-dark: #075C36;
    --primary-light: #E8F5EE;

    --accent: #B6DDBF;

    --background: #F5F8F6;
    --surface: #FFFFFF;
    --surface-soft: #F8FAF9;

    --text: #18352A;
    --text-secondary: #718078;
    --text-light: #9BA9A1;

    --border: #E5ECE7;

    --success: #168653;
    --danger: #D94A4A;
    --warning: #D99727;

    --shadow-sm:
        0 2px 8px rgba(20, 60, 40, 0.04);

    --shadow-md:
        0 12px 35px rgba(20, 60, 40, 0.08);

    --shadow-lg:
        0 24px 65px rgba(20, 60, 40, 0.12);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;

    --font:
        'DM Sans',
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
}

/* =====================================================
   RESET
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* =====================================================
   APPLICATION ROOT
===================================================== */

#app {
    min-height: 100vh;
    width: 100%;
}

#app-content {
    min-height: 100vh;
    width: 100%;
}

/* =====================================================
   LOGIN PAGE
===================================================== */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--surface);
    overflow: hidden;
}

/* LEFT PANEL */

.login-visual {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 80% 15%,
            rgba(126, 194, 149, 0.25),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #064C30,
            #087443 55%,
            #0B8951
        );

    padding: 55px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #FFFFFF;
    overflow: hidden;
}

.login-visual::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    right: -160px;
    bottom: -180px;
}

.login-visual::after {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 50%;
    right: -85px;
    bottom: -105px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 13px;
    position: relative;
    z-index: 1;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    backdrop-filter: blur(10px);
}

.brand-name {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.brand-subtitle {
    font-size: 10px;
    letter-spacing: 3px;
    opacity: 0.75;
    margin-top: 3px;
}

.visual-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: auto 0;
    padding: 60px 0;
}

.visual-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px;
    border-radius: 30px;
    background: rgba(255,255,255,0.13);
    border: 1px solid rgba(255,255,255,0.16);
    font-size: 12px;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
}

.visual-content h1 {
    font-size: clamp(38px, 4.5vw, 62px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 23px;
}

.visual-content h1 span {
    color: #BDE8C9;
}

.visual-content p {
    color: rgba(255,255,255,0.78);
    font-size: 16px;
    line-height: 1.8;
    max-width: 440px;
}

.visual-features {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    position: relative;
    z-index: 1;
}

.visual-feature {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    color: rgba(255,255,255,0.86);
}

.visual-feature i {
    color: #BDE8C9;
}

/* RIGHT PANEL */

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background: #FFFFFF;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-heading {
    margin-bottom: 36px;
}

.login-heading h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.login-heading p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

/* FORM */

.form-group {
    margin-bottom: 21px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 16px;
}

.form-input {
    width: 100%;
    height: 55px;
    padding: 0 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all 0.25s ease;
}

.form-input::placeholder {
    color: #AAB5AE;
}

.form-input:focus {
    border-color: var(--primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(8,116,67,0.09);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 5px;
}

.password-toggle:hover {
    color: var(--primary);
}

/* LOGIN BUTTON */

.btn-primary {
    width: 100%;
    min-height: 55px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(
        135deg,
        var(--primary),
        #0A8950
    );
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    box-shadow: 0 8px 18px rgba(8,116,67,0.20);
    transition: all 0.25s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(8,116,67,0.26);
}

.btn-primary:active {
    transform: scale(0.99);
}

.login-security {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 11px;
    margin-top: 27px;
}

/* =====================================================
   DASHBOARD FOUNDATION
===================================================== */

.dashboard {
    min-height: 100vh;
    background: var(--background);
}

.topbar {
    height: 76px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
}

.topbar-brand .brand-name {
    color: var(--text);
    font-size: 19px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

.store-profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.store-avatar {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
}

.store-details strong {
    display: block;
    font-size: 12px;
}

.store-details span {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
    margin-top: 3px;
}

/* DASHBOARD CONTENT */

.dashboard-content {
    max-width: 1440px;
    margin: auto;
    padding: 38px 5%;
}

.page-heading {
    margin-bottom: 30px;
}

.page-heading h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
}

.page-heading p {
    margin-top: 7px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* =====================================================
   SEARCH
===================================================== */

.search-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.search-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* SEARCH WRAPPER */

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
}

.search-wrapper > i {
    position: absolute;
    left: 19px;
    z-index: 2;
    color: var(--text-light);
    font-size: 17px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 62px;
    padding: 0 110px 0 52px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    background: var(--surface-soft);
    font-size: 15px;
    color: var(--text);
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(8,116,67,0.08);
}

/* CAMERA AND SEARCH BUTTONS */

.scan-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 11px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 3;
    transition: all 0.2s ease;
}

/* CAMERA BUTTON */

#scan-button {
    right: 59px;
}

/* SEARCH BUTTON */

#search-button {
    right: 13px;
    background: var(--primary);
    color: #FFFFFF;
}

.scan-button:hover:not(:disabled) {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(8,116,67,0.18);
}

.scan-button:active:not(:disabled) {
    transform: translateY(-50%) scale(0.95);
}

.scan-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================================
   PRODUCT CARDS
===================================================== */

.product-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

.product-name {
    font-size: 21px;
    font-weight: 800;
    line-height: 1.4;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.meta-chip {
    padding: 7px 12px;
    border-radius: 8px;
    background: var(--surface-soft);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.price-section {
    margin-top: 24px;
    padding: 21px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
}

.price-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 0.7px;
}

.price-value {
    color: var(--primary-dark);
    font-size: 34px;
    font-weight: 800;
    margin-top: 7px;
    letter-spacing: -1px;
}

/* =====================================================
   PROMOTION
===================================================== */

.promotion-section {
    margin-top: 25px;
}

.promotion-heading {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 15px;
}

.promotion-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.promotion-card {
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.promotion-type {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 7px;
    background: #FFF2E5;
    color: #B66B17;
    font-size: 11px;
    font-weight: 800;
}

.promotion-price {
    font-size: 25px;
    font-weight: 800;
    color: var(--primary);
    margin: 15px 0 8px;
}

.promotion-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.promotion-expiry {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 13px;
    margin-top: 14px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* =====================================================
   STATUS BADGES
===================================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
}

.status-success {
    background: #E8F5EE;
    color: #168653;
}

.status-warning {
    background: #FFF5E5;
    color: #B87A17;
}

.status-danger {
    background: #FDECEC;
    color: #D94A4A;
}

/* =====================================================
   LOADING
===================================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245,248,246,0.97);
    backdrop-filter: blur(8px);
}

.loading-card {
    width: min(90%, 390px);
    background: #FFFFFF;
    padding: 38px 30px;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 22px;
    animation: spin 0.85s linear infinite;
}

.loading-card h3 {
    font-size: 18px;
    margin-bottom: 9px;
}

.loading-card p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   EMPTY STATE
===================================================== */

.empty-state {
    padding: 55px 20px;
    text-align: center;
    background: #FFFFFF;
    border: 1px dashed #DCE7DF;
    border-radius: var(--radius-lg);
}

.empty-icon {
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 25px;
    margin: 0 auto 17px;
}

.empty-state h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.7;
}

/* =====================================================
   ALERTS
===================================================== */

.alert {
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.alert-error {
    background: #FDECEC;
    border: 1px solid #F7D3D3;
    color: #B83A3A;
}

.alert-success {
    background: #E8F5EE;
    border: 1px solid #D2EBDD;
    color: #147345;
}

/* =====================================================
   FOOTER
===================================================== */

.app-footer {
    padding: 25px 5%;
    text-align: center;
    color: var(--text-light);
    font-size: 11px;
}

/* =====================================================
   RESPONSIVE TABLET
===================================================== */

@media (max-width: 1024px) {

    .login-visual {
        padding: 38px;
    }

    .login-form-panel {
        padding: 35px;
    }

    .visual-content h1 {
        font-size: 43px;
    }

}

/* =====================================================
   RESPONSIVE MOBILE
===================================================== */

@media (max-width: 768px) {

    .login-page {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .login-visual {
        min-height: auto;
        padding: 27px 25px;
    }

    .visual-content {
        padding: 45px 0 35px;
    }

    .visual-content h1 {
        font-size: 38px;
        letter-spacing: -1.5px;
    }

    .visual-content p {
        font-size: 13px;
    }

    .visual-features {
        gap: 13px;
    }

    .visual-feature {
        font-size: 10px;
    }

    .login-form-panel {
        padding: 42px 25px;
    }

    .login-heading h2 {
        font-size: 27px;
    }

    .topbar {
        height: 65px;
        padding: 0 20px;
    }

    .topbar-brand .brand-name {
        font-size: 16px;
    }

    .dashboard-content {
        padding: 28px 18px;
    }

    .page-heading h1 {
        font-size: 23px;
    }

    .search-card {
        padding: 18px;
    }

    .search-input {
        height: 56px;
        font-size: 13px;
        padding-right: 105px;
    }

    .scan-button {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    #scan-button {
        right: 55px;
    }

    #search-button {
        right: 11px;
    }

    .product-card {
        padding: 19px;
    }

    .product-name {
        font-size: 18px;
    }

    .price-value {
        font-size: 29px;
    }

    .promotion-list {
        grid-template-columns: 1fr;
    }

    .promotion-card {
        padding: 17px;
    }

    .store-details {
        display: none;
    }

}

@media (max-width: 380px) {

    .login-visual {
        padding: 23px 19px;
    }

    .visual-content h1 {
        font-size: 33px;
    }

    .login-form-panel {
        padding: 35px 19px;
    }

    .brand-name {
        font-size: 19px;
    }

    .search-card {
        padding: 14px;
    }

    .search-input {
        font-size: 12px;
        padding-left: 43px;
        padding-right: 98px;
    }

    .search-wrapper > i {
        left: 14px;
    }

    .scan-button {
        width: 34px;
        height: 34px;
    }

    #scan-button {
        right: 51px;
    }

    #search-button {
        right: 9px;
    }

}
