html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

:root {
    --brand: #775a19;
    --brand-container: #c5a059;
    --primary-gradient: linear-gradient(135deg, #775a19 0%, #c5a059 100%);
    --surface-glass: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(255, 255, 255, 0.2);
    --shadow-premium: 0 20px 50px -12px rgba(0, 0, 0, 0.1);
}

.dark {
    --surface-glass: rgba(23, 23, 23, 0.7);
    --border-glass: rgba(255, 255, 255, 0.05);
}

body {
    background: #fdfbfb;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1a1c1a;
}

.dark body {
    background: #0c0a09;
    color: #e7e5e4;
}

/* Premium Utilities */
.glass {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
}

.shadow-premium {
    box-shadow: var(--shadow-premium);
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #e7e5e4;
    border-radius: 10px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #292524;
}

::-webkit-scrollbar-thumb:hover {
    background: #c5a059;
}

/* Auth Pages & Cards */
.auth-card {
    background: white;
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: var(--shadow-premium);
}

.dark .auth-card {
    background: #1c1917;
    border: 1px solid #292524;
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: 1rem;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(119, 90, 25, 0.4);
}

/* Animation utilities for Tailwind */
@layer utilities {
  .animation-delay-200 {
    animation-delay: 0.2s;
  }
  .animation-delay-400 {
    animation-delay: 0.4s;
  }
}

/* Custom Time Picker Styles */
.custom-time-picker-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-time-picker-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a8a29e; /* stone-400 */
    pointer-events: none;
    transition: color 0.15s ease-in-out;
}

.custom-time-picker-wrapper:focus-within .custom-time-picker-icon {
    color: var(--brand, #775a19);
}

.custom-time-picker-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 13rem;
    background: #ffffff;
    border: 1px solid #e7e5e4; /* stone-200 */
    border-radius: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 999;
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    animation: tpFadeIn 0.2s ease-out;
}

.dark .custom-time-picker-dropdown {
    background: #1c1917; /* stone-900 */
    border-color: #292524; /* stone-800 */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

@keyframes tpFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.custom-time-picker-columns {
    display: flex;
    gap: 0.75rem;
    height: 12rem;
    align-items: stretch;
}

.custom-time-picker-col {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-right: 0.25rem;
    position: relative;
}

.custom-time-picker-item {
    font-size: 0.875rem;
    padding: 0.4rem 0;
    text-align: center;
    border-radius: 0.75rem;
    cursor: pointer;
    color: #44403c; /* stone-700 */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.dark .custom-time-picker-item {
    color: #d6d3d1; /* stone-300 */
}

.custom-time-picker-item:hover {
    background: #f5f5f4; /* stone-100 */
    color: var(--brand, #775a19);
}

.dark .custom-time-picker-item:hover {
    background: #292524; /* stone-800 */
    color: var(--brand-container, #c5a059);
}

.custom-time-picker-item.active {
    background: var(--brand, #775a19);
    color: #ffffff !important;
    font-weight: 700;
}

.dark .custom-time-picker-item.active {
    background: var(--brand, #775a19);
    color: #ffffff !important;
}

.custom-time-picker-col::-webkit-scrollbar {
    width: 4px;
}

.custom-time-picker-col::-webkit-scrollbar-track {
    background: transparent;
}

.custom-time-picker-col::-webkit-scrollbar-thumb {
    background: #e7e5e4;
    border-radius: 2px;
}

.dark .custom-time-picker-col::-webkit-scrollbar-thumb {
    background: #44403c;
}

/* Custom Date Picker Styles */
.custom-date-picker-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-date-picker-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a8a29e; /* stone-400 */
    pointer-events: none;
    transition: color 0.15s ease-in-out;
    z-index: 10;
}

.custom-date-picker-wrapper:focus-within .custom-date-picker-icon {
    color: var(--brand, #775a19);
}

.custom-date-picker-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 17rem;
    background: #ffffff;
    border: 1px solid #e7e5e4; /* stone-200 */
    border-radius: 1.25rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 999;
    padding: 1rem;
    display: none;
    flex-direction: column;
    animation: dpFadeIn 0.2s ease-out;
}

.dark .custom-date-picker-dropdown {
    background: #1c1917; /* stone-900 */
    border-color: #292524; /* stone-800 */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

@keyframes dpFadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .custom-date-picker-dropdown {
        left: 50%;
        transform: translateX(-50%);
    }
    @keyframes dpFadeIn {
        from { opacity: 0; transform: translate(-50%, -5px); }
        to { opacity: 1; transform: translate(-50%, 0); }
    }
}

.custom-date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.custom-date-picker-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #292524; /* stone-800 */
    font-family: 'Inter', sans-serif;
}

.dark .custom-date-picker-title {
    color: #e7e5e4; /* stone-200 */
}

.custom-date-picker-nav-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #78716c; /* stone-500 */
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    transition: all 0.15s ease-in-out;
}

.custom-date-picker-nav-btn:hover {
    background: #f5f5f4; /* stone-100 */
    color: var(--brand, #775a19);
}

.dark .custom-date-picker-nav-btn:hover {
    background: #292524; /* stone-800 */
    color: var(--brand-container, #c5a059);
}

.custom-date-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #a8a29e; /* stone-400 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.custom-date-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.custom-date-picker-day {
    font-size: 0.75rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    cursor: pointer;
    color: #44403c; /* stone-700 */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.dark .custom-date-picker-day {
    color: #d6d3d1; /* stone-300 */
}

.custom-date-picker-day:hover {
    background: #f5f5f4; /* stone-100 */
    color: var(--brand, #775a19);
}

.dark .custom-date-picker-day:hover {
    background: #292524; /* stone-800 */
    color: var(--brand-container, #c5a059);
}

.custom-date-picker-day.dimmed {
    color: #d6d3d1; /* stone-300 */
    opacity: 0.4;
}

.dark .custom-date-picker-day.dimmed {
    color: #57534e; /* stone-600 */
}

.custom-date-picker-day.active {
    background: var(--brand, #775a19) !important;
    color: #ffffff !important;
    font-weight: 700;
}

.custom-date-picker-day.today {
    border: 1.5px solid var(--brand, #775a19);
}

.custom-date-picker-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    border-t: 1px solid #f5f5f4;
    padding-top: 0.5rem;
}

.dark .custom-date-picker-footer {
    border-color: #292524;
}

.custom-date-picker-footer-btn {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand, #775a19);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s ease-in-out;
}

.custom-date-picker-footer-btn:hover {
    background: #f5f5f4;
}

.dark .custom-date-picker-footer-btn:hover {
    background: #292524;
}