/* ==========================================================================
   COLTIRA GLOBAL DESIGN SYSTEM & STYLESHEET
   Aesthetics: Premium Natural Glassmorphism (Sage & Emerald Color Palette)
   ========================================================================== */

@font-face {
    font-family: 'Google Sans';
    src: url('../fonts/GoogleSans-Regular.ttf') format('truetype');
    font-weight: 400;
}
@font-face {
    font-family: 'Google Sans';
    src: url('../fonts/GoogleSans-Medium.ttf') format('truetype');
    font-weight: 500;
}
@font-face {
    font-family: 'Google Sans';
    src: url('../fonts/GoogleSans-Bold.ttf') format('truetype');
    font-weight: 700;
}

/* Design Tokens & Theme Variables */
:root {
    --primary-color: #198754;      /* Deep Mint Emerald */
    --primary-light: #20c997;      /* Vivid Mint Green */
    --primary-dark: #0f5132;       /* Dark Forest Green */
    --secondary-color: #0d6efd;    /* Accent Blue */
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    --bg-app: #f4f7f5;             /* Off-white soft cream */
    --bg-card: rgba(255, 255, 255, 0.75); /* Glassmorphic backdrop */
    --bg-glass-nav: rgba(255, 255, 255, 0.85);
    
    --text-main: #212529;          /* Rich charcoal */
    --text-muted: #6c757d;         /* Neutral gray */
    --text-light: #ffffff;
    
    --border-color: rgba(255, 255, 255, 0.4);
    --border-dark: rgba(0, 0, 0, 0.08);
    
    --font-heading: 'Google Sans', sans-serif;
    --font-body: 'Google Sans', sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(15, 81, 50, 0.03);
    --shadow-md: 0 8px 30px rgba(15, 81, 50, 0.06);
    --shadow-lg: 0 16px 40px rgba(15, 81, 50, 0.1);
    
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
}

/* Base Resets & Layout */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-app);
    background-image: 
        radial-gradient(at 0% 0%, rgba(32, 201, 151, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(25, 135, 84, 0.05) 0px, transparent 50%);
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-dark);
}

/* Custom Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.25;
}

h1 { font-size: 2.5rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.85rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.4rem; margin-bottom: 1rem; }

/* Buttons & Interactive Elements */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.3);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.5);
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--text-light);
}

.btn-danger:hover {
    background: #bd2130;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
}

/* Premium Glassmorphism Card Style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    padding: 24px;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(25, 135, 84, 0.15);
}

/* Header & Navigation Bar */
.app-header {
    background: var(--bg-glass-nav);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-icon {
    font-size: 1.6rem;
    color: var(--primary-color);
    background: none;
    -webkit-text-fill-color: initial;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-item {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-color);
    background: rgba(25, 135, 84, 0.08);
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-phone {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.user-role-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    background: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Mobile Navigation Hamburger & Drawer */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-dark);
    cursor: pointer;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.mobile-drawer.open {
    transform: translateX(-280px);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
}

.drawer-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-item {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: var(--border-radius-sm);
}

.drawer-item:hover, .drawer-item.active {
    color: var(--primary-color);
    background: rgba(25, 135, 84, 0.08);
}

.drawer-divider {
    border: none;
    border-top: 1px solid var(--border-dark);
    margin: 16px 0;
}

.drawer-user-info {
    margin-bottom: 16px;
}

.drawer-user-phone {
    font-weight: 600;
    margin-bottom: 4px;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Alert Notification System */
.alerts-container {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.alert-info {
    background: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 1.15rem;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-dark);
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
    background: #ffffff;
}

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

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
}

/* Main Content Wrapper */
.main-content {
    flex: 1;
    padding-top: 32px;
    padding-bottom: 64px;
}

/* Footer Section */
.app-footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 24px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .brand {
    margin-bottom: 16px;
}

.footer-brand img {
    filter: brightness(0) invert(1);
}

.footer-brand .brand-icon {
    color: var(--primary-light);
    -webkit-text-fill-color: initial;
}

.footer-tagline {
    font-size: 0.95rem;
    max-width: 320px;
}

.footer-heading {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
}

.footer-link:hover {
    color: var(--primary-light);
    padding-left: 4px;
}

.footer-link-static {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
}

/* Animation Keyframes */
@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    
    .nav-auth {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Hero Banner Enhancements */
.market-hero {
    position: relative;
    overflow: hidden;
    color: var(--text-light);
    border: none;
    box-shadow: var(--shadow-lg);
    background-image: 
        linear-gradient(rgba(15, 81, 50, 0.75), rgba(15, 81, 50, 0.90)),
        url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 60px 40px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius-lg);
}

.market-hero .hero-content h1 {
    color: var(--text-light);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.market-hero .hero-content p {
    font-size: 1.15rem;
    max-width: 600px;
    margin-bottom: 24px;
    opacity: 0.9;
}

.playstore-badge {
    height: 48px;
    width: auto;
    transition: var(--transition-smooth);
}

.playstore-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border-radius: 6px;
}
