@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;600;700&display=swap');

:root {
    /* M = viewport diagonal / 27 */
    --margin-m: calc(100vmax / 27);
}

body { 
    font-family: 'Rubik', Verdana, sans-serif; 
    color: #3c3c3c;
    line-height: 1.5;
    background-color: #f8f9fa;
}

.text-vi-robijn { color: #ec2e67; }
/* Only icons should be white in dark mode per user request */
.dark .text-vi-robijn-white { color: #ffffff !important; }

/* VI Background Component Gradient Overlay over white */
.bg-vi-gradient {
    background: linear-gradient(135deg, rgba(236, 46, 103, 0.6) 0%, rgba(114, 47, 208, 0.6) 50%, rgba(0, 1, 210, 0.6) 100%), #ffffff;
}

/* The decorative House Style Container - Clean white with soft shadow */
.vi-container {
    position: relative;
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    padding: 3rem;
    transition: transform 0.3s ease;
}

.vi-container-white {
    background: #ffffff;
    clip-path: none;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Login card shape (card.svg) */
.login-card-wrapper {
    filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.15));
}

.login-card {
    background: #ffffff;
    clip-path: url(#card-clip);
    padding: 4rem 3rem;
}

/* Force light mode on login screen */
#login-view .text-vi-dark { color: #3c3c3c !important; }
#login-view .text-gray-600 { color: #4b5563 !important; }

/* Language Switcher Active States */
.lang-btn-active {
    background-color: #f3f4f6;
    color: #ec2e67 !important;
}
.dark .lang-btn-active {
    background-color: #374151; /* gray-700 from tailwind */
}
.lang-btn-inactive {
    color: #6b7280; /* gray-500 from tailwind */
}

.login-lang-active {
    background-color: rgba(255, 255, 255, 0.3);
    color: #ffffff !important;
}
.login-lang-inactive {
    color: rgba(255, 255, 255, 0.6);
}

.dark body {
    background-color: #121212;
    background-image: radial-gradient(circle at top right, rgba(236, 46, 103, 0.05), transparent 400px),
                      radial-gradient(circle at bottom left, rgba(114, 47, 208, 0.05), transparent 400px);
    color: #f3f4f6;
}

.dark .vi-container-white {
    background-color: #1e1e1e;
    border-color: #2e2e2e;
    color: #f3f4f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.dark .bg-gray-50 { background-color: #1a1a1a !important; }
.dark .bg-white { background-color: #1e1e1e !important; }
.dark .text-gray-900 { color: #ffffff !important; }
.dark .text-gray-600 { color: #a1a1aa !important; }

.dark .vi-container {
    background-color: #1e1e1e;
    color: #f3f4f6;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.dark .text-vi-dark { color: #f3f4f6 !important; }
.dark .border-gray-100 { border-color: #2e2e2e !important; }
.dark .border-gray-200 { border-color: #2e2e2e !important; }
.dark .hover\:bg-gray-50:hover { background-color: #2a2a2a !important; }
.dark .bg-gray-100 { background-color: #2a2a2a !important; }
.dark .btn-secondary { background-color: #1e1e1e; color: #f3f4f6; border-color: #3f3f3f; }
.dark .btn-secondary:disabled { background-color: #1e1e1e; color: #4b5563; border-color: #2e2e2e; opacity: 0.6; }
.dark .btn-secondary:hover:not(:disabled) { background-color: #3c3c3c; color: #ffffff; }

.dark .cell-input:hover { background-color: #2a2a2a !important; }
.dark .cell-input:focus { background-color: #1a1a1a !important; border-color: #ec2e67; border-radius: 12px; }
.dark .empty-cell-placeholder { color: #3f3f3f; }
.dark td:hover .empty-cell-placeholder { color: #ec2e67; }

/* Modal Dark Mode */
.dark #time-entry-modal > div {
    background-color: #1e1e1e !important;
    color: #f3f4f6 !important;
}

.dark #time-entry-modal input,
.dark #time-entry-modal select,
.dark #time-entry-modal textarea {
    background-color: #2a2a2a !important;
    border-color: #3f3f3f !important;
    color: #f3f4f6 !important;
}

.dark #time-entry-modal label {
    color: #a1a1aa !important;
}

/* Table Line Consistency in Dark Mode */
.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: #2e2e2e !important;
}

/* Favorites header polish (Dark Ruby) */
.bg-vi-ruby-soft { 
    background-color: rgba(236, 46, 103, 0.05) !important; 
    border-left: 4px solid #cc2859 !important;
}
.text-vi-ruby-dark { color: #cc2859 !important; }

.dark .bg-vi-ruby-soft { 
    background-color: rgba(236, 46, 103, 0.15) !important; 
    border-left: 4px solid #ec2e67 !important;
}

/* Status badges refinement */
.dark .status-submitted {
    background-color: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.dark .status-draft {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Glassmorphism hint for header */
.dark header {
    background-color: rgba(15, 15, 15, 0.8) !important;
    backdrop-filter: blur(12px);
    border-color: #262626 !important;
}

/* Scrollbar for dark mode */
.dark ::-webkit-scrollbar-track { background: #1a1a1a; }
.dark ::-webkit-scrollbar-thumb { background: #333333; }
.dark ::-webkit-scrollbar-thumb:hover { background: #444444; }

/* VI Primary button */
.btn-primary {
    background-color: #ec2e67;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px; /* rounded-vi style */
}

.btn-primary:hover:not(:disabled) {
    background-color: #d11d56;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 46, 103, 0.3);
}
.btn-primary:disabled {
    background-color: rgba(236, 46, 103, 0.45);
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    filter: saturate(0.6);
}

/* VI Secondary button */
.btn-secondary {
    background-color: #ffffff;
    color: #3c3c3c;
    border: 1px solid #3c3c3c;
    transition: all 0.2s;
    line-height: 1.5;
}
.btn-secondary:disabled {
    background-color: transparent;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled {
    background-color: rgba(60, 60, 60, 0.1);
    color: #9ca3af;
    cursor: not-allowed;
    border: 1px solid #e5e7eb;
}

/* Hour input cells */
.cell-input {
    width: 100%;
    text-align: center;
    border: 1px solid transparent;
    padding: 6px 8px;
    font-size: 0.875rem;
    color: #3c3c3c;
    background-color: transparent;
    outline: none;
    border-radius: 12px;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.cell-input:hover {
    background-color: #f3f4f6;
}

.cell-input:focus {
    background-color: #fff;
    border: 1px solid #ec2e67;
    box-shadow: 0 0 0 2px rgba(236, 46, 103, 0.15);
    border-radius: 12px;
}

/* Empty cell placeholder */
.empty-cell-placeholder {
    width: 100%;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #d1d5db;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

td:hover .empty-cell-placeholder {
    color: #ec2e67;
    background-color: transparent;
}

.table-container {
    margin: var(--margin-m) auto;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* Status badges */
.status-badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 8px;
    line-height: 1.4;
    text-transform: uppercase;
}

.status-draft {
    background-color: #3c3c3c;
    color: #ffffff;
}

.status-unsaved {
    background-color: #ff9a62;
    color: #ffffff;
}

.status-submitted {
    background-color: #16a34a;
    color: #ffffff;
}

.status-unknown {
    background-color: #9ca3af;
    color: #ffffff;
}

/* Status row: holds comment icon + badge inline */
.status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: 2px;
}

.comment-icon {
    font-size: 10px;
    line-height: 1;
    cursor: default;
}

/* Day columns: percentage-based for equal widths that scale */
.day-col {
    width: 9%;
    min-width: 70px;
    white-space: nowrap;
    text-align: center;
}

/* Total column: narrower than day columns */
.total-col {
    width: 5%;
    min-width: 40px;
    white-space: nowrap;
}

/* Card description column: takes remaining space, allows truncation */
.card-description-col {
    overflow: hidden;
}

.card-text-truncate {
    min-width: 0;
    overflow: hidden;
}

.truncate-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sticky table header — works inside the scrollable div */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 5;
}
.sticky-header th {
    background: #f9fafb;
}

/* View Switcher Styles */
.view-switcher {
    display: flex;
    background-color: #f3f4f6;
    border-radius: 12px;
    padding: 3px;
    gap: 2px;
    border: 1px solid #e5e7eb;
    margin-left: 1rem;
}

.dark .view-switcher {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.view-btn {
    padding: 5px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9px;
    transition: all 0.2s ease;
    cursor: pointer;
    color: #6b7280;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn:hover:not(.active) {
    color: #3c3c3c;
    background-color: rgba(0, 0, 0, 0.05);
}

.dark .view-btn {
    color: rgba(255, 255, 255, 0.5);
}

.dark .view-btn:hover:not(.active) {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    background-color: #ec2e67;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(236, 46, 103, 0.2);
}

