/* =====================================================================
   FILE: assets/css/style.css
   PROJECT: daylikaj
   PURPOSE: Global stylesheet — layout, components, utilities.
   ===================================================================== */

/* ===============================
   CSS VARIABLES (Injected by main.js from THEME_CONFIG)
   =============================== */
:root {
    --color-primary: #008080;
    --color-primary-dark: #006666;
    --color-primary-light: #33a1a1;
    --color-secondary: #FF1493;
    --color-secondary-dark: #c71085;
    --color-success: #28a745;
    --color-danger: #e74c3c;
    --color-warning: #ffc107;
    --color-info: #17a2b8;
    --color-earning-badge: #007bff;
    --color-deposit-badge: #28a745;
    --color-cyan-border: #00bcd4;

    --color-white: #ffffff;
    --color-black: #000000;
    --color-bg: #f5f7fa;
    --color-text: #212529;
    --color-text-muted: #6c757d;
    --color-border: #dee2e6;
    --color-card-bg: #ffffff;

    --font-bengali: 'Hind Siliguri', sans-serif;
    --font-english: 'Poppins', sans-serif;
    --font-base: 'Hind Siliguri', 'Poppins', sans-serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 50px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.12);
    --shadow-card: 0 2px 8px rgba(0,0,0,0.08);

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    --header-height: 60px;
    --bottom-nav-height: 60px;

    --transition-base: all 0.25s ease-in-out;
}

/* ===============================
   RESET / BASE
   =============================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: var(--font-base);
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ===============================
   HEADER
   =============================== */
.dl-header {
    background: var(--color-primary);
    color: var(--color-white);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--shadow-sm);
}
.dl-header .logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 8px;
}
.dl-header .header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dl-header .header-icons i,
.dl-header .header-icons .icon-btn {
    color: var(--color-white);
    font-size: 20px;
    cursor: pointer;
    position: relative;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition-base);
    background: transparent;
    border: none;
}
.dl-header .header-icons .icon-btn:hover {
    background: rgba(255,255,255,0.15);
}
.dl-header .badge-count {
    position: absolute;
    top: 0; right: 0;
    background: var(--color-danger);
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50px;
    font-weight: 700;
}
.dl-header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.5);
    object-fit: cover;
    cursor: pointer;
}

/* ===============================
   MAIN CONTAINER
   =============================== */
.dl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.dl-main {
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
    padding-bottom: var(--spacing-lg);
}

/* ===============================
   BALANCE BADGES
   =============================== */
.dl-balance-row {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}
.dl-badge-balance {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}
.dl-badge-earning { background: var(--color-earning-badge); }
.dl-badge-deposit { background: var(--color-deposit-badge); }
.dl-badge-balance .amount {
    font-size: 18px;
    font-weight: 700;
}

/* ===============================
   FILTER BUTTONS (Hot Pink)
   =============================== */
.dl-filter-row {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}
.dl-filter-btn {
    background: var(--color-secondary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-base);
}
.dl-filter-btn:hover {
    background: var(--color-secondary-dark);
    transform: translateY(-1px);
}
.dl-filter-btn i { font-size: 14px; }

/* ===============================
   JOB CARD
   =============================== */
.dl-job-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-cyan-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-card);
    transition: var(--transition-base);
    position: relative;
}
.dl-job-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.dl-job-card .job-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-text);
}
.dl-job-card .top-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--color-warning);
    color: #000;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-transform: uppercase;
}
.dl-job-card .job-price {
    color: var(--color-success);
    font-weight: 700;
    font-size: 18px;
}
.dl-job-card .job-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* NEW: Job card structural classes */
.dl-job-card .job-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.dl-job-card .job-meta-row i {
    font-size: 11px;
    color: var(--color-primary);
}
.dl-job-card .job-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    border-top: 1px solid rgba(0,0,0,.05);
    padding-top: 8px;
}
body.dark-mode .dl-job-card .job-bottom {
    border-top-color: rgba(255,255,255,.08);
}
.dl-job-card .job-bottom span {
    font-size: 12px;
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dl-progress {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin: 8px 0;
}
.dl-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-pill);
    transition: width 0.4s ease;
}

/* ===============================
   BUTTONS
   =============================== */
.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-family: var(--font-base);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 14px;
    text-decoration: none;
}
.dl-btn:hover { transform: translateY(-1px); }
.dl-btn-primary   { background: var(--color-primary); color: #fff; }
.dl-btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.dl-btn-secondary { background: var(--color-secondary); color: #fff; }
.dl-btn-success   { background: var(--color-success); color: #fff; }
.dl-btn-danger    { background: var(--color-danger); color: #fff; }
.dl-btn-warning   { background: var(--color-warning); color: #212529; }
.dl-btn-outline   { background: transparent; border: 1.5px solid var(--color-primary); color: var(--color-primary); }
.dl-btn-outline:hover { background: var(--color-primary); color: #fff; }
.dl-btn-block     { display: flex; width: 100%; }
.dl-btn:disabled  { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ===============================
   FORMS
   =============================== */
.dl-form-group {
    margin-bottom: var(--spacing-md);
}
.dl-form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-text);
    font-size: 14px;
}
.dl-form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-base);
    font-size: 14px;
    transition: var(--transition-base);
    background: #fff;
    color: var(--color-text);
}
.dl-form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0,128,128,0.15);
}
.dl-form-control.is-invalid {
    border-color: var(--color-danger);
}
.dl-form-hint {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}
.dl-form-error {
    font-size: 12px;
    color: var(--color-danger);
    margin-top: 4px;
}

textarea.dl-form-control { min-height: 100px; resize: vertical; }

/* ===============================
   CARD (Generic)
   =============================== */
.dl-card {
    background: var(--color-card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-card);
    margin-bottom: var(--spacing-md);
}
.dl-card-header {
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
    font-size: 16px;
}

/* ===============================
   BOTTOM NAV (Mobile)
   =============================== */
.dl-bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
    z-index: 1020;
}
.dl-bottom-nav a {
    color: var(--color-text-muted);
    text-align: center;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 10px;
    transition: var(--transition-base);
    text-decoration: none;
}
.dl-bottom-nav a i { font-size: 20px; }
.dl-bottom-nav a.active,
.dl-bottom-nav a:hover { color: var(--color-primary); }

/* ===============================
   MARQUEE
   =============================== */
.dl-marquee {
    background: var(--color-warning);
    color: #212529;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
}
.dl-marquee-inner {
    display: inline-block;
    padding-left: 100%;
    animation: dl-marquee 25s linear infinite;
}
@keyframes dl-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ===============================
   LOADER
   =============================== */
.dl-loader-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1090;
}
.dl-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: dl-spin 0.8s linear infinite;
}
@keyframes dl-spin {
    to { transform: rotate(360deg); }
}

/* ===============================
   TOAST
   =============================== */
.dl-toast-container {
    position: fixed;
    top: 80px; right: 20px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}
.dl-toast {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: dl-toast-in 0.3s ease;
    border-left: 4px solid var(--color-info);
}
.dl-toast.success { border-left-color: var(--color-success); }
.dl-toast.error   { border-left-color: var(--color-danger); }
.dl-toast.warning { border-left-color: var(--color-warning); }
@keyframes dl-toast-in {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ===============================
   UTILITIES
   =============================== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-muted  { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-danger  { color: var(--color-danger); }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

.rounded-circle { border-radius: 50%; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }

.hidden { display: none !important; }

/* ===============================
   EMPTY STATE
   =============================== */
.dl-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
}
.dl-empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.dl-empty-state p { font-size: 14px; }

/* ===============================
   FIND JOBS PAGE FIX (Mobile)
   =============================== */
@media(max-width:575px){
    .dl-job-card {
        padding: 14px;
        margin-bottom: 12px;
        border-radius: 14px;
        display: block;
        position: relative;
        overflow: hidden;
        background: var(--color-card-bg);
        border: 1px solid var(--color-cyan-border);
        box-shadow: var(--shadow-card);
        transform: translateZ(0);
    }
    .dl-job-card:hover { transform: translateY(-2px); }
    
    .dl-job-card .job-title {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.4;
        margin-bottom: 6px;
        padding-right: 50px;
        color: var(--color-text);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 0;
        white-space: normal;
    }
    .dl-job-card .top-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        background: #ffc107;
        color: #000;
        font-size: 10px;
        padding: 3px 7px;
        border-radius: 50px;
        font-weight: 700;
        text-transform: uppercase;
        z-index: 2;
        line-height: 1.2;
        white-space: nowrap;
    }
    .dl-job-card .job-meta-row {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        color: var(--color-text-muted);
        margin-bottom: 8px;
        flex-wrap: wrap;
    }
    .dl-job-card .job-meta-row i {
        font-size: 11px;
        color: var(--color-primary);
    }
    .dl-progress {
        width: 100%;
        height: 5px;
        background: #e0e0e0;
        border-radius: 50px;
        overflow: hidden;
        margin: 6px 0 8px;
    }
    .dl-progress-bar {
        height: 100%;
        background: linear-gradient(90deg, var(--color-primary), #33a1a1);
        border-radius: 50px;
        transition: width .4s ease;
    }
    .dl-job-card .job-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 4px;
        border-top: 1px solid rgba(0,0,0,.05);
        padding-top: 8px;
    }
    body.dark-mode .dl-job-card .job-bottom {
        border-top-color: rgba(255,255,255,.08);
    }
    .dl-job-card .job-bottom span {
        font-size: 12px;
        color: var(--color-text-muted);
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    .dl-job-card .job-price {
        color: var(--color-success);
        font-weight: 700;
        font-size: 16px;
        white-space: nowrap;
    }
    .search-row input {
        border-radius: 12px !important;
        border: 1.5px solid var(--color-border) !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
        background: var(--color-card-bg) !important;
    }
    .search-row input:focus {
        border-color: var(--color-primary) !important;
        box-shadow: 0 0 0 3px rgba(0,128,128,.12) !important;
    }
    .dl-filter-btn {
        padding: 8px 14px;
        border-radius: 50px;
        font-size: 12px;
    }
    .dl-job-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }
}