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

/* --- Variables --- */
:root {
  --primary-bg: #edf2f7; /* Slightly darker light background for better contrast */
  --secondary-bg: #ffffff;
  --text-color: #2d3748; /* Darker text */
  --text-muted: #718096;
  --border-color: #e2e8f0;
  /* More vibrant accents */
  --accent-blue: #3b82f6; 
  --accent-green: #10b981;
  --accent-orange: #f59e0b; /* Brighter orange */
  --accent-purple: #a855f7; /* Brighter purple */
  --accent-red: #ef4444;
  --accent-pink: #ec4899; /* Added pink for variety */
  --accent-cyan: #06b6d4; /* Added cyan for variety */

  /* Enhanced gradients */
  --header-gradient: linear-gradient(135deg, #6366f1, #a855f7); /* Indigo to Purple */
  --card-blue-gradient: linear-gradient(135deg, #60a5fa, #3b82f6);
  --card-green-gradient: linear-gradient(135deg, #34d399, #10b981);
  --card-orange-gradient: linear-gradient(135deg, #fbbf24, #f59e0b); /* Orange gradient */
  --card-purple-gradient: linear-gradient(135deg, #c084fc, #a855f7);
  --card-red-gradient: linear-gradient(135deg, #f87171, #ef4444);
  --card-pink-gradient: linear-gradient(135deg, #f472b6, #ec4899);
  --card-cyan-gradient: linear-gradient(135deg, #22d3ee, #06b6d4);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius-sm: 0.375rem; /* 6px */
  --border-radius-md: 0.5rem;   /* 8px */
  --border-radius-lg: 0.75rem;  /* 12px */
  --border-radius-xl: 1rem;    /* 16px */
  --border-radius-full: 9999px;
  --font-family-base: "Poppins", sans-serif;
}

body.dark-mode {
  --primary-bg: #111827;
  --secondary-bg: #1f2937;
  --text-color: #f9fafb;
  --text-muted: #9ca3af;
  --border-color: #374151;
  /* Dark mode vibrant accents */
  --accent-blue: #60a5fa;
  --accent-green: #34d399;
  --accent-orange: #fbbf24;
  --accent-purple: #c084fc;
  --accent-red: #f87171;
  --accent-pink: #f472b6;
  --accent-cyan: #22d3ee;

  /* Dark mode gradients */
  --header-gradient: linear-gradient(135deg, #4338ca, #7e22ce); /* Darker vibrant */
  --card-blue-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
  --card-green-gradient: linear-gradient(135deg, #10b981, #059669);
  --card-orange-gradient: linear-gradient(135deg, #f59e0b, #d97706);
  --card-purple-gradient: linear-gradient(135deg, #a855f7, #9333ea);
  --card-red-gradient: linear-gradient(135deg, #ef4444, #dc2626);
  --card-pink-gradient: linear-gradient(135deg, #ec4899, #db2777);
  --card-cyan-gradient: linear-gradient(135deg, #06b6d4, #0891b2);
}

/* --- Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--primary-bg);
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover,
a:focus {
  color: color-mix(in srgb, var(--accent-blue) 80%, black);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input,
button,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 0.6rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.3s, color 0.3s;
}

input:focus,
button:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-blue) 25%, transparent);
}

button {
  cursor: pointer;
  border: none;
  transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

button:active {
    transform: scale(0.98);
}

/* --- Layout & Container --- */
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --- Site Title --- */
.site-title-container {
    text-align: center;
    padding: 2rem 1rem 1rem;
    background-color: var(--primary-bg);
}

.site-title-container h1 {
    font-size: 3.5rem; /* Significantly larger */
    font-weight: 700;
    /* Apply a subtle gradient text effect */
    background: var(--header-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(2px 2px 3px rgba(0,0,0,0.1)); /* Add subtle shadow */
    line-height: 1.2;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) and (not (background-clip: text)) {
  .site-title-container h1 {
    color: var(--accent-purple); /* Use a vibrant color as fallback */
    background: none;
  }
}

/* --- Top Bar - Mockup Style --- */
.top-bar {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: var(--header-gradient);
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.dark-mode-button {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.2rem;
    padding: 0.6rem;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-mode-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.search-container {
    flex-grow: 1;
    display: flex;
    position: relative;
}

.search-container input[type="search"] {
    flex-grow: 1;
    padding-left: 2.5rem;
    padding-right: 1rem;
    border-radius: var(--border-radius-full);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    box-shadow: var(--shadow-sm);
}

body.dark-mode .search-container input[type="search"] {
    background-color: rgba(55, 65, 81, 0.9);
    color: var(--text-color);
}

.search-container .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.search-container button#search-button {
    display: none;
}

.header-links {
    display: flex;
    gap: 0.5rem;
    white-space: nowrap;
}

.header-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: var(--border-radius-md);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-links a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* --- Category Tabs - Mockup Style --- */
.tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem 1.5rem 0.5rem;
    background-color: var(--primary-bg);
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-link {
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    background-color: var(--secondary-bg);
    color: var(--text-muted);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.tab-link:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}

.tab-link.active {
    color: #fff;
    box-shadow: var(--shadow-md);
}

/* More vibrant active tab colors */
.tab-link[data-category="physics"].active { background-color: var(--accent-blue); border-color: var(--accent-blue); }
.tab-link[data-category="finance"].active { background-color: var(--accent-green); border-color: var(--accent-green); }
.tab-link[data-category="health"].active { background-color: var(--accent-orange); border-color: var(--accent-orange); } /* Health = Orange */
.tab-link[data-category="math"].active { background-color: var(--accent-purple); border-color: var(--accent-purple); }
.tab-link[data-category="cooking"].active { background-color: var(--accent-red); border-color: var(--accent-red); }
.tab-link[data-category="other"].active { background-color: var(--accent-cyan); border-color: var(--accent-cyan); } /* Added color for Other */
.tab-link[data-category="all"].active { background-color: var(--text-muted); border-color: var(--text-muted); } /* Color for All */

/* Category-specific colors for inactive tabs to match their respective sections */
.tab-link[data-category="physics"]:not(.active) { 
    background-color: rgba(59, 130, 246, 0.15); 
    border-color: rgba(59, 130, 246, 0.3); 
    color: var(--accent-blue); 
}
.tab-link[data-category="finance"]:not(.active) { 
    background-color: rgba(34, 197, 94, 0.15); 
    border-color: rgba(34, 197, 94, 0.3); 
    color: var(--accent-green); 
}
.tab-link[data-category="health"]:not(.active) { 
    background-color: rgba(249, 115, 22, 0.15); 
    border-color: rgba(249, 115, 22, 0.3); 
    color: var(--accent-orange); 
}
.tab-link[data-category="math"]:not(.active) { 
    background-color: rgba(147, 51, 234, 0.15); 
    border-color: rgba(147, 51, 234, 0.3); 
    color: var(--accent-purple); 
}
.tab-link[data-category="cooking"]:not(.active) { 
    background-color: rgba(239, 68, 68, 0.15); 
    border-color: rgba(239, 68, 68, 0.3); 
    color: var(--accent-red); 
}
.tab-link[data-category="other"]:not(.active) { 
    background-color: rgba(6, 182, 212, 0.15); 
    border-color: rgba(6, 182, 212, 0.3); 
    color: var(--accent-cyan); 
}
.tab-link[data-category="all"]:not(.active) { 
    background-color: var(--secondary-bg); 
    border-color: var(--border-color); 
    color: var(--text-muted); 
}

/* Keep All and Other tabs visible */
.tab-link[data-category="all"],
.tab-link[data-category="other"] {
    display: inline-block; /* Ensure they are visible */
}


/* --- Main Content & Calculator Grid - Mockup Style --- */
#main-content {
  padding-top: 0;
  padding-bottom: 2rem;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.calculator-card {
    background: var(--secondary-bg);
    border-radius: var(--border-radius-xl);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 180px;
    overflow: hidden;
    position: relative;
}

.calculator-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.calculator-card .card-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.2); /* Brighter icon background */
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    display: inline-flex;
    box-shadow: var(--shadow-sm);
}

body.dark-mode .calculator-card .card-icon-wrapper {
     background-color: rgba(0, 0, 0, 0.25); /* Darker icon background */
}

.calculator-card i {
    font-size: 2.5rem;
    color: #fff;
    line-height: 1;
}

.calculator-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff; /* White text on all gradient cards */
    margin: 0;
}

/* Assign vibrant gradient backgrounds based on category */
.calculator-card[data-category="physics"] { background: var(--card-blue-gradient); }
.calculator-card[data-category="finance"] { background: var(--card-green-gradient); }
.calculator-card[data-category="health"] { background: var(--card-orange-gradient); } /* Health = Orange */
.calculator-card[data-category="math"] { background: var(--card-purple-gradient); }
.calculator-card[data-category="cooking"] { background: var(--card-red-gradient); }
.calculator-card[data-category="other"] { background: var(--card-cyan-gradient); } /* Other = Cyan */

/* --- Footer --- */
footer {
  background-color: var(--secondary-bg);
  color: var(--text-muted);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    .site-title-container h1 {
        font-size: 2.25rem; /* Adjusted mobile title size */
    }

    .top-bar {
        flex-wrap: wrap;
        padding: 0.5rem 1rem;
        position: static;
        border-radius: 0;
    }

    .search-container {
        order: 3;
        width: 100%;
        margin-top: 0.5rem;
    }

    .header-links {
        order: 2;
        margin-left: auto;
    }

    .dark-mode-button {
        order: 1;
    }

    .tabs {
        padding: 0.75rem 1rem;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar { display: none; }


    .tab-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .calculator-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .calculator-card {
        padding: 1rem;
        min-height: 140px;
        border-radius: var(--border-radius-lg);
    }

    .calculator-card .card-icon-wrapper {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .calculator-card i {
        font-size: 2rem;
    }

    .calculator-card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .calculator-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Utilities --- */
.hidden {
  display: none !important;
}

/* --- Ad Placeholders --- */
.ad-placeholder {
    background-color: var(--border-color);
    border: 1px dashed var(--text-muted);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    border-radius: var(--border-radius-md);
    margin: 1.5rem auto;
}
.ad-leaderboard { min-height: 90px; max-width: 728px; width: 100%; }
.ad-medium-rectangle { min-height: 250px; max-width: 300px; width: 100%; }


/* Placeholder for individual calculator page styles - adapt as needed */
.calculator-page-content {
    background-color: var(--secondary-bg);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    max-width: 700px;
    margin: 2rem auto;
}

.calculator-page-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-weight: 600;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
}

.form-row label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-row input,
.form-row select {
    border-radius: var(--border-radius-md);
}

.calculate-button {
    background-color: var(--accent-blue);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    width: 100%;
    margin-top: 1rem;
}

.calculate-button:hover {
    background-color: color-mix(in srgb, var(--accent-blue) 85%, black);
    box-shadow: var(--shadow-md);
}

.result-area {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background-color: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 2.5em;
    word-wrap: break-word;
    margin-bottom: 2rem; /* Increased spacing after result */
}




/* --- Calculator Description Spacing --- */
.history-content {
    margin-top: 2rem; /* Added spacing before description */
}

.history-content h3 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
}

.history-content p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}




/* --- Calculator Card Hover Effect --- */
.calculator-card {
    /* Ensure transitions are defined for smooth hover */
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.calculator-card:hover {
    transform: translateY(-8px); /* Slightly more lift */
    box-shadow: var(--shadow-lg); /* Keep existing shadow enhancement */
    filter: brightness(1.1); /* Add brightness effect on hover */
}




/* --- Attorney Time Tracking Table Specific Styles --- */
.time-tracking-table {
    table-layout: fixed; /* Helps control column widths */
    width: 100%;
    margin-top: 1rem;
    border-collapse: collapse;
    font-size: 0.9rem;
    overflow-x: auto; /* Add scroll if needed on small screens */
    display: block; /* Needed for overflow-x */
}

.time-tracking-table th,
.time-tracking-table td {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap; /* Prevent wrapping in cells */
}

.time-tracking-table th {
    background-color: var(--primary-bg);
}

/* Column Width Adjustments */
.time-tracking-table th:nth-child(1), /* Description */
.time-tracking-table td:nth-child(1) {
    width: 30%; /* Adjusted width */
    white-space: normal; /* Allow description to wrap */
    text-align: left;
}
.time-tracking-table th:nth-child(2), /* Start Time */
.time-tracking-table td:nth-child(2),
.time-tracking-table th:nth-child(3), /* End Time */
.time-tracking-table td:nth-child(3) {
    width: 18%; /* Adjusted width */
}
.time-tracking-table th:nth-child(4), /* Total Minutes */
.time-tracking-table td:nth-child(4),
.time-tracking-table th:nth-child(5), /* Billable Hours */
.time-tracking-table td:nth-child(5) {
    width: 10%; /* Adjusted width */
}
.time-tracking-table th:nth-child(6), /* Remove */
.time-tracking-table td:nth-child(6) {
    width: 14%; /* Adjusted width */
}

.time-tracking-table input[type="text"],
.time-tracking-table input[type="time"] {
    width: 100%; /* Use full cell width */
    padding: 0.4rem;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    background-color: var(--secondary-bg); /* Use theme background */
    color: var(--text-color);
    font-size: 0.9rem; /* Slightly smaller font for inputs */
}

.time-tracking-table input[type="time"] {
    min-width: 120px; /* Increased min-width for time + AM/PM */
}

.time-tracking-table input[readonly] {
    background-color: var(--primary-bg); /* Match header bg */
    border: none;
    text-align: center;
    color: var(--text-color);
    width: 100%;
    padding: 0.4rem;
    box-sizing: border-box;
    font-size: 0.9rem;
}

.remove-row-button {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    background-color: var(--accent-red);
    color: white;
    border-radius: var(--border-radius-sm);
}
.remove-row-button:hover {
    background-color: color-mix(in srgb, var(--accent-red) 85%, black);
}

/* Adjust container width for Attorney Time page if needed */
#other-attorney-time.calculator-page-content {
    max-width: 900px; /* Increase max-width to better fit the table */
}

/* Improve visibility of action buttons */
/* General Button Styles below handle this now */
/* #other-attorney-time .action-buttons .button-secondary { ... } */
/* #other-attorney-time .action-buttons .button-secondary:hover { ... } */




/* --- General Button Styles --- */
.button-primary {
    background-color: var(--accent-blue);
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    display: inline-flex; /* Align icon and text if needed */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent; /* Add border for consistency */
}

.button-primary:hover {
    background-color: color-mix(in srgb, var(--accent-blue) 85%, black);
    box-shadow: var(--shadow-md);
}

.button-secondary {
    background-color: var(--accent-orange); /* Use orange for secondary actions */
    color: #fff;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent; /* Add border for consistency */
}

.button-secondary:hover {
    background-color: color-mix(in srgb, var(--accent-orange) 85%, black);
    box-shadow: var(--shadow-md);
}

/* Specific button adjustments if needed */
.download-button {
    /* Specific styles for download buttons if different */
    /* Currently uses button-secondary (orange) */
}

.clear-button {
    background-color: var(--accent-red); /* Use red for clear/delete actions */
    color: #fff;
}

.clear-button:hover {
    background-color: color-mix(in srgb, var(--accent-red) 85%, black);
}

/* Ensure buttons in action areas use these styles */
.action-buttons button {
    /* Default to primary if no class? Or require classes? */
    /* Let's assume classes will be applied */
}

/* Unit Toggle Buttons */
.unit-toggle-buttons button {
    background-color: var(--border-color); /* Changed background for inactive */
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    margin-right: 0.5rem; /* Add some space between buttons */
    border-radius: var(--border-radius-md);
}

.unit-toggle-buttons button.active {
    background-color: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
    font-weight: 500;
}

.unit-toggle-buttons button:last-child {
    margin-right: 0;
}



/* --- GPA Calculator Specific Styles --- */
.gpa-credits {
    width: 80px; /* Adjust width specifically for credits input */
    text-align: center; /* Center the number */
}



/* Time Zone Converter Result Alignment */
#timeZoneResult {
    text-align: left;
}



/* === ENHANCED CALCULATOR LAYOUT SEPARATION === */

/* Calculator Section Container */
.calculator-section {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
}

.calculator-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--header-gradient);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

/* Calculator Form Styling */
.calculator-form {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

/* Result Area Enhanced */
.result-area {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    border: none;
}

.result-area strong {
    font-size: 1.3rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Formula Area Styling */
.formula-area {
    background-color: var(--primary-bg);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-green);
}

.formula-area h4 {
    color: var(--accent-green);
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.formula-area h4::before {
    content: '📊';
    font-size: 1.2rem;
}

.formula-area p {
    font-family: 'Courier New', monospace;
    background-color: var(--secondary-bg);
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Educational Content Section */
.history-content {
    background-color: var(--primary-bg);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    margin-top: 3rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.history-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-red));
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.history-content h3 {
    color: var(--accent-orange);
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-content h3::before {
    content: '📚';
    font-size: 1.3rem;
}

.history-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

.history-content p:last-child {
    margin-bottom: 0;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
    margin: 2rem 0;
    border-radius: var(--border-radius-full);
}

/* Enhanced Form Rows */
.form-row {
    margin-bottom: 1.25rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

/* Input Group Styling */
.input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.input-group input {
    flex: 1;
}

/* Enhanced Number Inputs */
.number-input, .currency-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background-color: var(--secondary-bg);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.number-input:focus, .currency-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: var(--secondary-bg);
}

.number-input:hover, .currency-input:hover {
    border-color: var(--accent-blue);
}

/* Dark Mode Adjustments */
body.dark-mode .calculator-section {
    background-color: var(--secondary-bg);
    border-color: var(--border-color);
}

body.dark-mode .result-area {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
}

body.dark-mode .formula-area {
    background-color: var(--primary-bg);
    border-color: var(--border-color);
}

body.dark-mode .history-content {
    background-color: var(--primary-bg);
    border-color: var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-section,
    .history-content {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .formula-area {
        padding: 1rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .input-group input {
        width: 100%;
    }
}

/* === END ENHANCED CALCULATOR LAYOUT === */


/* === TIME TRACKING TABLE STYLES === */
.time-tracking-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.time-tracking-table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.time-tracking-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--secondary-bg);
}

.time-tracking-table th,
.time-tracking-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.time-tracking-table th {
    background-color: var(--primary-bg);
    font-weight: 600;
    color: var(--text-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.time-tracking-table td input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    font-size: 0.875rem;
}

.time-tracking-table td input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.time-tracking-table .entry-description {
    min-width: 150px;
}

.time-tracking-table .entry-start-time,
.time-tracking-table .entry-end-time {
    min-width: 120px;
}

.time-tracking-table .entry-rate {
    min-width: 100px;
}

.time-tracking-table .entry-minutes,
.time-tracking-table .entry-billable-hours,
.time-tracking-table .entry-fee {
    text-align: right;
    font-weight: 500;
    min-width: 80px;
}

.time-tracking-summary {
    background-color: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--primary-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.summary-item label {
    font-weight: 600;
    color: var(--text-color);
}

.summary-item span {
    font-weight: 700;
    color: var(--accent-blue);
    font-size: 1.1rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #6b7280;
    color: white;
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Dark mode adjustments for time tracking */
body.dark-mode .time-tracking-table {
    background-color: var(--primary-bg);
}

body.dark-mode .time-tracking-table th {
    background-color: var(--secondary-bg);
}

body.dark-mode .time-tracking-table td input {
    background-color: var(--primary-bg);
    border-color: var(--border-color);
}

body.dark-mode .time-tracking-summary {
    background-color: var(--primary-bg);
}

body.dark-mode .summary-item {
    background-color: var(--secondary-bg);
}

/* Responsive design for time tracking table */
@media (max-width: 768px) {
    .time-tracking-table-container {
        font-size: 0.875rem;
    }
    
    .time-tracking-table th,
    .time-tracking-table td {
        padding: 0.5rem;
    }
    
    .time-tracking-controls {
        flex-direction: column;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}

/* === END TIME TRACKING TABLE STYLES === */


/* === AMORTIZATION TABLE STYLES === */
.amortization-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.amortization-table th {
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-weight: 600;
    padding: 1rem 0.75rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.amortization-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Alternating row colors with proper contrast */
.amortization-table tbody tr:nth-child(even) {
    background-color: #f8fafc; /* Very light gray-blue */
    color: #1a202c; /* Dark text for good contrast */
}

.amortization-table tbody tr:nth-child(odd) {
    background-color: #2d3748; /* Dark background */
    color: #f7fafc; /* Light text for good contrast */
}

/* Hover effects */
.amortization-table tbody tr:hover {
    background-color: var(--accent-blue) !important;
    color: white !important;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Dark mode adjustments */
body.dark-mode .amortization-table {
    background-color: var(--primary-bg);
}

body.dark-mode .amortization-table th {
    background-color: var(--secondary-bg);
    color: var(--text-color);
}

body.dark-mode .amortization-table tbody tr:nth-child(even) {
    background-color: #374151; /* Darker gray for dark mode */
    color: #f9fafb; /* Light text */
}

body.dark-mode .amortization-table tbody tr:nth-child(odd) {
    background-color: #1f2937; /* Very dark background */
    color: #e5e7eb; /* Light gray text */
}

/* Responsive design */
@media (max-width: 768px) {
    .amortization-table {
        font-size: 0.8rem;
    }
    
    .amortization-table th,
    .amortization-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* === END AMORTIZATION TABLE STYLES === */

