﻿/* =====================================================
   SHoppzzy Admin Design System
   Scalable • Reusable • SaaS Ready
=====================================================*/

/* ===============================
   ROOT VARIABLES (GLOBAL TOKENS)
=================================*/
:root {
    /* Brand */
    --color-primary: #2563eb;
    --color-primary-hover: #1e40af;
    --color-danger: #dc2626;
    --color-success: #16a34a;
    /* Backgrounds */
    --color-bg-page: #f4f6f9;
    --color-bg-card: #ffffff;
    --color-bg-input: #f9fafb;
    /* Borders */
    --color-border: #d1d5db;
    --color-border-light: #e5e7eb;
    /* Text */
    --color-text-dark: #1f2937;
    --color-text-muted: #6b7280;
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 18px;
    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.06);
    /* Transitions */
    --transition-fast: 0.2s ease;
}

/* ===============================
   GLOBAL RESET
=================================*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background: var(--color-bg-page);
    color: var(--color-text-dark);
    -webkit-font-smoothing: antialiased;
}

/* Headings use brand font */
h1, h2, h3, h4, h5, h6,
.brand-title {
    font-family: 'Poppins', sans-serif;
    margin-top: 0;
}

/* ===============================
   LOGIN WRAPPER
=================================*/
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===============================
   CARD (Phone Style)
=================================*/
.admin-card {
    width: 100%;
    max-width: 420px;
    background: var(--color-bg-card);
    padding: 35px 30px;
    border-radius: var(--radius-lg);
    border: 3px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

/* ===============================
   BRAND
=================================*/
.brand-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

    .brand-wrapper img {
        height: 40px;
        width: auto;
    }

/* Responsive logo scaling */
@media (max-width: 480px) {
    .brand-wrapper img {
        height: 32px;
    }
}

/* ===============================
   FORM GROUP
=================================*/
.form-group {
    margin-bottom: 20px;
}

/* ===============================
   LABEL
=================================*/
.form-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: var(--color-text-dark);
}

/* ===============================
   INPUTS
=================================*/
.form-control-custom {
    width: 100%;
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    font-size: 14px;
    background: var(--color-bg-input);
    transition: var(--transition-fast);
}

    .form-control-custom:focus {
        outline: none;
        border-color: var(--color-primary);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    }

/* ===============================
   BUTTONS
=================================*/
.btn-primary-custom {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

    .btn-primary-custom:hover {
        background: var(--color-primary-hover);
    }

.btn-danger-custom {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--color-danger);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

    .btn-danger-custom:hover {
        opacity: 0.9;
    }

/* ===============================
   VALIDATION
=================================*/
.text-danger {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-danger);
}

.input-validation-error {
    border-color: var(--color-danger) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.validation-summary-errors {
    margin-top: 15px;
    padding: 12px;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    color: #991b1b;
    font-size: 14px;
}

/* ===============================
   FLOATING LABEL
=================================*/
.form-floating-custom {
    position: relative;
}

    .form-floating-custom .form-control-custom {
        padding: 18px 14px 8px 14px; /* extra top padding */
    }

    .form-floating-custom label {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 14px;
        color: var(--color-text-muted);
        pointer-events: none;
        transition: var(--transition-fast);
        background: var(--color-bg-card);
        padding: 0 4px;
    }

    /* When focused */
    .form-floating-custom .form-control-custom:focus + label,
    .form-floating-custom .form-control-custom:not(:placeholder-shown) + label {
        top: 6px;
        transform: translateY(0);
        font-size: 11px;
        font-weight: 600;
        color: var(--color-primary);
    }

.input-validation-error + label {
    color: var(--color-danger);
}

/* ===============================
   ALERT COMPONENT (Reusable)
=================================*/
.alert-success {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 14px;
}

.alert-danger {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 14px;
}

/* ===============================
   UTILITIES
=================================*/
.text-muted {
    color: var(--color-text-muted);
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

/* ===============================
   DARK MODE (Future Ready)
   Activate with: <body data-theme="dark">
=================================*/
[data-theme="dark"] {
    --color-bg-page: #0f172a;
    --color-bg-card: #1e293b;
    --color-bg-input: #334155;
    --color-text-dark: #f1f5f9;
    --color-border: #475569;
}
