.tetrice-bg {
    background: #0f0f0f;
}

.status-active {
    background: #404040;
    color: #e5e5e5;
}

.status-potential {
    background: #525252;
    color: #e5e5e5;
}

.status-paused {
    background: #262626;
    color: #a3a3a3;
}

.modal {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Dark mode overrides */
[data-theme="dark"] {
    --fallback-b1: #171717;
    --fallback-b2: #0a0a0a;
    --fallback-b3: #000000;
    --fallback-bc: #e5e5e5;
    --fallback-pc: #f5f5f5;
}

/* Light mode overrides */
[data-theme="light"] {
    --fallback-b1: #ffffff;
    --fallback-b2: #f8fafc;
    --fallback-b3: #f1f5f9;
    --fallback-bc: #1e293b;
    --fallback-pc: #334155;
}

.section-card {
    background: #171717;
    border: 1px solid #262626;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: #f5f5f5;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* Light mode section styles */
[data-theme="light"] .section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .section-header {
    color: #1f2937;
}

/* Input placeholder styling */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Light mode input and text styles */
[data-theme="light"] input {
    color: #1f2937 !important;
}

[data-theme="light"] textarea {
    color: #1f2937 !important;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #9ca3af !important;
}

[data-theme="light"] select {
    color: #1f2937 !important;
}

[data-theme="light"] .text-gray-100 {
    color: #1f2937 !important;
}

[data-theme="light"] .text-gray-400 {
    color: #6b7280 !important;
}

/* Light mode table dividers */
[data-theme="light"] .divide-y > * + * {
    border-top-color: #e5e7eb !important;
}

[data-theme="light"] .table-mobile {
    color: #1f2937 !important;
}

/* Remove number input arrows/spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield;
}

/* Enhanced input styling */
.monthly-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    color: #f5f5f5 !important;
}

.monthly-input[type="number"] {
    text-align: right !important;
}

.monthly-input:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
    outline: none !important;
}

.monthly-input:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Light mode monthly input styling */
[data-theme="light"] .monthly-input {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1f2937 !important;
}

[data-theme="light"] .monthly-input:focus {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

[data-theme="light"] .monthly-input:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Enhanced status select styling */
.status-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    outline: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    color: #f5f5f5 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23a1a1aa' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 12px center !important;
    background-repeat: no-repeat !important;
    background-size: 20px !important;
    padding-right: 40px !important;
}

.status-select:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.status-select:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Status-specific colors - Dark Mode */
.status-active {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

.status-paused {
    background: linear-gradient(135deg, #6b7280, #4b5563) !important;
    border-color: #6b7280 !important;
    color: #f3f4f6 !important;
}

.status-potential {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}

/* Light mode status select */
[data-theme="light"] .status-select {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1f2937 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23374151' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
}

[data-theme="light"] .status-select:focus {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

[data-theme="light"] .status-select:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Light mode status colors */
[data-theme="light"] .status-active {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

[data-theme="light"] .status-paused {
    background: linear-gradient(135deg, #9ca3af, #6b7280) !important;
    border-color: #9ca3af !important;
    color: #ffffff !important;
}

[data-theme="light"] .status-potential {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #171717;
}

::-webkit-scrollbar-thumb {
    background: #525252;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #737373;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #525252 #171717;
}

/* Toast animations */
@keyframes slide-in {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Dashboard animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease-out;
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* Dashboard card hover effects */
.dashboard-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    transform: translateY(-4px);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .mobile-full {
        width: 100% !important;
    }
    
    .mobile-text-sm {
        font-size: 0.875rem !important;
    }
    
    .mobile-px-2 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .mobile-py-1 {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }
    
    .mobile-hidden {
        display: none !important;
    }
    
    .table-mobile {
        font-size: 0.75rem !important;
    }
    
    .table-mobile input {
        font-size: 0.75rem !important;
        padding: 0.25rem !important;
    }
    
    .table-mobile th {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.625rem !important;
    }
    
    .table-mobile td {
        padding: 0.5rem 0.25rem !important;
    }
}

/* Custom button primary styles for better contrast */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem !important;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: 1px solid #3b82f6 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    border-color: #2563eb !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
    outline: none;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Light mode button primary styles */
[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-theme="light"] .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    border-color: #2563eb !important;
}

[data-theme="light"] .btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

/* Alert styles */
.alert {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.75rem;
    animation: slide-in 0.3s ease-out;
}

.alert i {
    font-size: 1.125rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* Light mode alerts */
[data-theme="light"] .alert-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

[data-theme="light"] .alert-success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
}

[data-theme="light"] .alert-warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}

[data-theme="light"] .alert-info {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

/* Textarea styling */
textarea.monthly-input {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
    text-align: left !important;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
}

table thead tr {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
}

table td {
    padding: 0.75rem;
    font-size: 0.875rem;
}

/* Light mode table */
[data-theme="light"] table thead tr {
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] table th {
    color: rgba(0, 0, 0, 0.6);
}

/* Modal backdrop */
.fixed.inset-0.z-50 {
    backdrop-filter: blur(4px);
}

/* Smooth transitions */
button, input, select, textarea {
    transition-property: all;
    transition-duration: 200ms;
}

/* Action button styles (edit, delete, etc) */
button[title] {
    transition: all 0.2s ease;
}

button[title]:hover {
    transform: scale(1.1);
}

/* Form spacing */
form .space-y-4 > * + * {
    margin-top: 1rem;
}

/* Grid layouts */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-4 {
    gap: 1rem;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:items-center {
        align-items: center;
    }
    
    .md\:justify-between {
        justify-content: space-between;
    }
}

/* Overflow utilities */
.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.overflow-y-auto {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Max height utilities */
.max-h-\[90vh\] {
    max-height: 90vh;
}

/* Max width utilities */
.max-w-lg {
    max-width: 32rem;
}

.max-w-7xl {
    max-width: 80rem;
}

/* Margin auto */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Print styles */
@media print {
    .no-print,
    button,
    .btn {
        display: none !important;
    }

    .print-full {
        display: block !important;
    }
}
