/* =====================================================
   SUIMAS AGENTIC AI - MODERN GOOGLE-INSPIRED UI
   Professional Green & Orange Color Scheme
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Google-inspired Primary Colors */
    --primary-green: #0f9e6e;     /* Primary Action Green */
    --primary-orange: #f57c00;    /* Secondary Action Orange */
    --light-green: #34a853;       /* Accent Green */
    --light-orange: #ffb74d;      /* Light Orange */
    
    /* Supporting Colors */
    --success: #34a853;
    --warning: #f57c00;
    --danger: #ea4335;
    --info: #4285f4;
    
    /* Backgrounds */
    --white-bg: #ffffff;
    --light-gray-bg: #f8f9fa;
    --dark-gray-bg: #202124;
    --darker-gray-bg: #171b1f;
    
    /* Text Colors */
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #9aa0a6;
    --text-light: #ffffff;
    
    /* Borders */
    --border-light: #dadce0;
    --border-dark: #3c4043;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0f9e6e 0%, #34a853 100%);
    --gradient-secondary: linear-gradient(135deg, #f57c00 0%, #ffb74d 100%);
    --gradient-accent: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* ============= BASE STYLES ============= */

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light-gray-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

/* ============= TYPOGRAPHY ============= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-green);
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--light-green);
}

/* ============= LAYOUT ============= */

body {
    display: flex;
    flex-direction: column;
}

.navbar {
    background: var(--white-bg);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    flex: 1;
    margin-left: var(--spacing-2xl);
}

.nav-item a {
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-item a:hover {
    color: var(--primary-green);
}

.nav-actions {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

/* ============= SIDEBAR ============= */

.sidebar {
    width: 240px;
    background: var(--white-bg);
    border-right: 1px solid var(--border-light);
    padding: var(--spacing-xl) 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    position: sticky;
    top: 60px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-item {
    margin: 0;
}

.sidebar-item a {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-item a:hover {
    background: var(--light-gray-bg);
    color: var(--primary-green);
    border-left: 3px solid var(--primary-green);
    padding-left: calc(var(--spacing-lg) - 3px);
}

.sidebar-item.active a {
    background: rgba(15, 158, 110, 0.1);
    color: var(--primary-green);
    border-left: 3px solid var(--primary-green);
    padding-left: calc(var(--spacing-lg) - 3px);
}

/* ============= MAIN CONTENT ============= */

.main-content {
    flex: 1;
    display: flex;
    margin-left: 240px;
    background: var(--light-gray-bg);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-2xl);
}

/* ============= CARDS & COMPONENTS ============= */

.card {
    background: var(--white-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* ============= GRID LAYOUT ============= */

.grid {
    display: grid;
    gap: var(--spacing-lg);
    width: 100%;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============= BUTTONS ============= */

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--light-gray-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-warning {
    background: var(--primary-orange);
    color: white;
}

.btn-warning:hover {
    opacity: 0.9;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
}

/* ============= BADGES ============= */

.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-primary {
    background: rgba(15, 158, 110, 0.15);
    color: var(--primary-green);
}

.badge-success {
    background: rgba(52, 168, 83, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 124, 0, 0.15);
    color: var(--primary-orange);
}

.badge-danger {
    background: rgba(234, 67, 53, 0.15);
    color: var(--danger);
}

.badge-info {
    background: rgba(66, 133, 244, 0.15);
    color: var(--info);
}

/* ============= FORMS ============= */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--white-bg);
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(15, 158, 110, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

/* ============= TABLES ============= */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-lg);
}

thead {
    background: var(--light-gray-bg);
    border-bottom: 2px solid var(--border-light);
}

th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

tbody tr:hover {
    background: rgba(15, 158, 110, 0.05);
}

/* ============= MODALS ============= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    margin: auto;
}

.modal-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    margin-top: var(--spacing-xl);
}

/* ============= STAT CARDS ============= */

.stat-card {
    background: var(--white-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-light);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-change {
    font-size: 0.85rem;
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
}

.stat-change.positive {
    background: rgba(52, 168, 83, 0.15);
    color: var(--success);
}

.stat-change.negative {
    background: rgba(234, 67, 53, 0.15);
    color: var(--danger);
}

/* ============= ANIMATIONS ============= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease;
}

.animate-slide-left {
    animation: slideInLeft 0.4s ease;
}

.animate-slide-up {
    animation: slideInUp 0.4s ease;
}

/* ============= RESPONSIVE ============= */

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .nav-menu {
        display: none;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .container {
        padding: var(--spacing-lg);
    }
}

/* ============= UTILITIES ============= */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-tertiary);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.p-lg {
    padding: var(--spacing-lg);
}

.hidden {
    display: none;
}

/* ============= SCROLLBAR ============= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}


/* ============= ENHANCED RESPONSIVE STYLES ============= */

/* Mobile hamburger menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: var(--spacing-sm);
}

.mobile-menu-toggle:hover {
    background: var(--light-gray-bg);
    border-radius: var(--radius-sm);
}

/* Tablet and below - 1024px */
@media (max-width: 1024px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Enhanced Mobile - 768px and below */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 280px;
    }

    .sidebar.active {
        left: 0;
        box-shadow: var(--shadow-xl);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: var(--spacing-lg);
        max-height: 90vh;
        overflow-y: auto;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-sm {
        width: auto;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px;
    }
}

/* Small mobile - 480px and below */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: var(--spacing-sm);
    }

    .card {
        padding: var(--spacing-sm);
    }
}
