:root {
    /* Admin Bolt Theme Palette */
    --primary: #fb611d;
    /* Vibrant Orange */
    --primary-light: rgba(251, 97, 29, 0.1);
    --secondary: #0f172a;
    /* Navy Dark */
    --secondary-light: #1e293b;
    --accent: #10b981;
    /* Emerald */

    --dark: #0f172a;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-hover: #1e293b;

    --slate: #64748b;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 10px;

    --header-height: 64px;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; */
    background-color: var(--light-bg);
    color: var(--dark);
    line-height: 1.5;
}

/* Heading Sizes */
h1 {
    font-size: 20px;
}

h2 {
    font-size: 18px;
}

h3 {
    font-size: 16px;
}

h4 {
    font-size: 14px;
}

h5 {
    font-size: 12px;
}

h6 {
    font-size: 11px;
}

/* Layout Utilities */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Header */
.main-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-text span {
    color: var(--secondary);
}

/* Sidebar (Admin Bolt Dark Style) */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    height: 100vh;
    position: sticky;
    top: 0;
    border-right: none;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: var(--white);
}

.sidebar-link.active {
    background: var(--primary);
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(251, 97, 29, 0.3);
}

/* Main Content Area */
.content-wrapper {
    flex: 1;
    padding: 2rem;
}

/* IndiaMart Style Elements */
.im-hero {
    background: linear-gradient(135deg, var(--primary), #0d47a1);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--white);
}

.im-search-bar {
    max-width: 800px;
    margin: -30px auto 0;
    background: var(--white);
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
}

.im-search-bar input {
    flex: 1;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    outline: none;
}

.im-search-bar button {
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
}

/* Grid & Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    border: none;
}

/* Global Form Styliing */
input,
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--dark);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(251, 100, 27, 0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--slate);
    font-size: 0.9rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

/* Action Buttons */
.action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.action-btn-edit {
    background: var(--primary-light);
    color: var(--primary);
}

.action-btn-edit:hover {
    background: var(--primary);
    color: var(--white);
}

.action-btn-delete {
    background: #fee2e2;
    color: #ef4444;
}

.action-btn-delete:hover {
    background: #ef4444;
    color: var(--white);
}

.action-btn-view {
    background: #e0f2fe;
    color: var(--secondary);
}

.action-btn-view:hover {
    background: var(--secondary);
    color: var(--white);
}

/* Responsive Layout & Utilities */
.app-container {
    display: flex;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1;
    min-width: 0;
    /* Prevent horizontal overflow */
}

/* Sidebar Toggle for Mobile */
#sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--secondary);
    cursor: pointer;
    margin-right: 1rem;
}

/* Responsive Grid System */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Responsive Table */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Base Responsive Rules */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #sidebar-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -var(--sidebar-width);
        z-index: 1000;
        transition: left 0.3s ease;
        height: 100vh;
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .content-wrapper {
        padding: 0;
    }

    .main-header {
        padding: 0 1rem;
    }

    .page-content {
        padding: 1rem !important;
    }

    /* Form rows on mobile */
    .form-row {
        flex-direction: column !important;
        gap: 1rem !important;
    }
}

/* Form Layouts */
.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.section-title {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* Tabs System */
.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: var(--slate);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    background: var(--light-bg);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(251, 97, 29, 0.2);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
}