/* Shadcn-inspired Gray & Orange Design System */
:root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 24.6 95% 53.1%;
    /* Orange 600 */
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 24.6 95% 53.1%;
    --radius: 0.5rem;
}

* {
    box-sizing: border-box;
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.grid {
    display: grid;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Component Styles */
.card {
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
}

.card-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid hsl(var(--border));
}

.input {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--input));
    background-color: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsla(var(--ring), 0.2);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    height: 2.5rem;
    padding: 0 1rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.button-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
}

.button-primary:hover {
    opacity: 0.9;
}

.button-ghost {
    background-color: transparent;
    color: hsl(var(--foreground));
    border: none;
}

.button-ghost:hover {
    background-color: hsl(var(--accent));
}

/* Specific Overrides */
.header {
    height: 4rem;
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    position: sticky;
    top: 0;
    z-index: 40;
}

.login-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: white;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid transparent;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-outline {
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
}

.badge-success {
    background-color: #f0fdf4;
    color: #166534;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-in {
    animation: slideUp 0.3s ease-out forwards;
}

.hidden {
    display: none;
}

.bg-accent {
    background-color: hsl(var(--accent));
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.2s ease-in-out;
}

.hover\:border-primary:hover {
    border-color: hsl(var(--primary)) !important;
    box-shadow: 0 0 0 1px hsla(var(--primary), 0.1);
}

/* Proposal Layouts */
.proposal-card {
    border: none;
    background: linear-gradient(to bottom, #ffffff, #fcfcfc);
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: relative;
    border-top: 5px solid hsl(var(--primary));
}

.proposal-banner {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, #ff8a4c 100%);
    color: white;
    padding: 1.25rem;
    text-align: center;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.proposal-value {
    font-size: 3rem;
    font-weight: 800;
    color: hsl(var(--primary));
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.proposal-action-btn {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, #ff8a4c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.proposal-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Premium Tariff List UI - Table Design */
.tariff-list-item {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.2s ease;
    padding: 0.75rem 1rem;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .tariff-list-item {
        flex-direction: row;
        padding: 0.75rem 1rem;
    }
}

.tariff-list-item.selectable {
    cursor: pointer;
}

.tariff-list-item.selectable:hover {
    border-color: rgba(234, 88, 12, 0.5);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.1);
    transform: translateY(-1px);
}

.t-left {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.t-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.mb-2 {
    margin-bottom: 0.25rem;
}

.gap-2 {
    gap: 0.35rem;
}

.t-table-container {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

.t-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    text-align: right;
}

.t-table th {
    color: #64748b;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-bottom: 1px dashed #e2e8f0;
}

.t-table th:first-child {
    text-align: left;
}

.t-table td {
    padding: 0.35rem 0.5rem;
    color: #1e293b;
    font-weight: 600;
    border-bottom: 1px dashed #f1f5f9;
}

.t-table tr:last-child td {
    border-bottom: none;
}

.t-concept {
    text-align: left;
    font-weight: 700 !important;
    color: #334155 !important;
}

.t-unit {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.65rem;
    margin-left: 4px;
}

.t-boe-cell {
    text-align: center !important;
    color: #d97706 !important;
    font-weight: 700 !important;
    background: #fffbeb;
    border-radius: 4px;
}

.t-right {
    flex: 0 0 120px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.t-select-btn {
    background: #ffffff;
    color: hsl(var(--primary));
    border: 1px solid hsl(var(--primary));
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    line-height: 1.2;
}

.tariff-list-item.selectable:hover .t-select-btn {
    background: hsl(var(--primary));
    color: white;
}