/* ─── NirmaanSetu Vendor Portal Styles ─── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f3f4f6;
    color: #1f2937;
    min-height: 100vh;
}

/* ─── Auth Screen ─── */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #115e59 100%);
    padding: 1rem;
}

.auth-container {
    background: #fff;
    border-radius: 1rem;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0d9488;
}

.auth-subtitle {
    color: #6b7280;
    font-size: .875rem;
    margin-top: .25rem;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form {}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: .875rem;
    color: #6b7280;
}

.auth-switch a {
    color: #0d9488;
    font-weight: 500;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .75rem;
}

.pending-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.pending-msg {
    text-align: center;
    color: #6b7280;
    font-size: .9rem;
    line-height: 1.5;
}

.pending-info {
    text-align: center;
    color: #9ca3af;
    font-size: .8rem;
    margin-top: .5rem;
}

/* ─── Forms ─── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: .35rem;
}

.form-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    font-size: .9rem;
    font-family: inherit;
    transition: border-color .2s;
    outline: none;
}

.form-input:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: .75rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.5rem;
    background: #0d9488;
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    border: none;
    border-radius: .5rem;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
}

.btn-primary:hover {
    background: #0f766e;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.5rem;
    background: #e5e7eb;
    color: #374151;
    font-weight: 600;
    font-size: .9rem;
    border: none;
    border-radius: .5rem;
    cursor: pointer;
    transition: background .2s;
    font-family: inherit;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.5rem;
    background: transparent;
    color: #6b7280;
    font-weight: 500;
    font-size: .9rem;
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.w-full {
    width: 100%;
}

.text-sm {
    font-size: .875rem;
}

.text-gray-500 {
    color: #6b7280;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* ─── Dashboard Layout ─── */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0d9488 0%, #115e59 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 50;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-role {
    font-size: .75rem;
    color: rgba(255, 255, 255, .7);
    margin-top: .25rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: .75rem 1.5rem;
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    transition: all .2s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.nav-item.active {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-left-color: #fff;
    font-weight: 600;
}

.nav-icon {
    margin-right: .75rem;
    font-size: 1.1rem;
}

.nav-label {
    font-size: .9rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, .15);
}

.vendor-info {
    margin-bottom: .75rem;
}

.vendor-name {
    font-size: .9rem;
    font-weight: 600;
}

.vendor-status {
    font-size: .75rem;
    color: rgba(255, 255, 255, .7);
}

.btn-logout {
    width: 100%;
    padding: .5rem;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .5rem;
    cursor: pointer;
    font-size: .85rem;
    font-family: inherit;
    transition: background .2s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, .2);
}

/* ─── Main Content ─── */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 40;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.top-bar-name {
    font-size: .9rem;
    color: #6b7280;
}

.module-container {
    padding: 2rem;
}

/* ─── KPI Cards ─── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: #fff;
    border-radius: .75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-icon {
    width: 3rem;
    height: 3rem;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.kpi-label {
    font-size: .75rem;
    color: #6b7280;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* ─── Tables ─── */
.data-card {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    overflow: hidden;
}

.data-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.data-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f9fafb;
}

th {
    padding: .75rem 1rem;
    text-align: left;
    font-size: .75rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .05em;
}

td {
    padding: .75rem 1rem;
    font-size: .875rem;
    border-top: 1px solid #f3f4f6;
}

tr:hover {
    background: #f9fafb;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.pagination-info {
    font-size: .85rem;
    color: #6b7280;
}

.pagination-btns {
    display: flex;
    gap: .5rem;
}

.pagination-btns button {
    padding: .4rem 1rem;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: .375rem;
    font-size: .85rem;
    cursor: pointer;
    font-family: inherit;
}

.pagination-btns button:hover {
    background: #f3f4f6;
}

.pagination-btns .current-page {
    background: #0d9488;
    color: #fff;
    border-color: #0d9488;
}

/* ─── Action Buttons ─── */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .4rem .75rem;
    font-size: .75rem;
    font-weight: 500;
    color: #fff;
    border: none;
    border-radius: .375rem;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .2s;
}

.action-btn:hover {
    opacity: .85;
}

.btn-view {
    background: #3b82f6;
}

.btn-edit {
    background: #8b5cf6;
}

.btn-accept {
    background: #22c55e;
}

.btn-start {
    background: #f59e0b;
}

.btn-complete {
    background: #10b981;
}

.btn-cancel {
    background: #ef4444;
}

.btn-delete {
    background: #6b7280;
}

.btn-deactivate {
    background: #f59e0b;
}

.btn-activate {
    background: #22c55e;
}

/* ─── Status Badge ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .6rem;
    font-size: .7rem;
    font-weight: 500;
    border-radius: 9999px;
    text-transform: capitalize;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-confirmed {
    background: #dbeafe;
    color: #1e40af;
}

.badge-in_progress,
.badge-in-progress {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-inactive {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-failed {
    background: #fee2e2;
    color: #991b1b;
}

.badge-refunded {
    background: #fef3c7;
    color: #92400e;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-content {
    background: #fff;
    border-radius: .75rem;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}

/* ─── Toast ─── */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.toast {
    padding: .75rem 1.25rem;
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 500;
    color: #fff;
    animation: slideIn .3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.toast-success {
    background: #059669;
}

.toast-error {
    background: #dc2626;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ─── Charts ─── */
.chart-container {
    background: #fff;
    border-radius: .75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #374151;
}

/* ─── Loading ─── */
.loading-spinner {
    text-align: center;
    padding: 4rem;
    color: #6b7280;
    font-size: 1rem;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-header,
    .sidebar-footer .vendor-info,
    .nav-label,
    .sidebar-role {
        display: none;
    }

    .sidebar-logo {
        font-size: .75rem;
        text-align: center;
    }

    .nav-item {
        justify-content: center;
        padding: .75rem;
        border-left: none;
    }

    .nav-icon {
        margin: 0;
    }

    .main-content {
        margin-left: 70px;
    }

    .module-container {
        padding: 1rem;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ─── Utility Colors ─── */
.bg-teal-100 {
    background: #ccfbf1;
}

.bg-blue-100 {
    background: #dbeafe;
}

.bg-green-100 {
    background: #d1fae5;
}

.bg-yellow-100 {
    background: #fef3c7;
}

.bg-red-100 {
    background: #fee2e2;
}

.bg-purple-100 {
    background: #ede9fe;
}

.bg-orange-100 {
    background: #ffedd5;
}

.text-teal-600 {
    color: #0d9488;
}

.text-blue-600 {
    color: #2563eb;
}

.text-green-600 {
    color: #059669;
}

.text-yellow-600 {
    color: #d97706;
}

.text-red-600 {
    color: #dc2626;
}

.text-purple-600 {
    color: #7c3aed;
}