/* Farm Records Styles - Custom Color Scheme */

/* Color Variables */
:root {
  --logo-green: #38643A;
  --logo-brown: #635240;
  --logo-beige: #F8F4EA;
  --logo-blue: #87B5DE;
  --logo-white: #FFFFFF;
  --logo-yellow: #E9C97C;
}

/* Mountain Divider Component */
.mountain-divider {
    width: 100%;
    height: 64px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 80' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,80 L0,60 Q20,55 40,65 Q60,50 110,50 Q120,40 140,42 Q170,38 170,55 Q200,37 230,50 Q250,30 260,37 Q280,10 310,40 Q320,30 350,45 Q370,25 390,45 Q400,35 420,50 Q460,40 500,45 Q520,33 540,60 Q560,45 600,60 L600,80 Z' fill='%2338643A' opacity='0.17'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: contain;
    opacity: 1; /* SVG opacity is already subtle */
    margin: 2.5rem 0 2rem 0;
    pointer-events: none;
    position: relative;
    clear: both;
}

/* Mountain Divider Variations */
.mountain-divider.top {
    background-position: top;
    transform: scaleY(-1);
    margin: 2rem 0 2.5rem 0;
}

.mountain-divider.subtle {
    height: 48px;
    margin: 1.5rem 0;
    opacity: 0.8;
}

.mountain-divider.bold {
    height: 80px;
    margin: 3rem 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 80' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,80 L0,60 Q20,55 40,65 Q60,50 110,50 Q120,40 140,42 Q170,38 170,55 Q200,37 230,50 Q250,30 260,37 Q280,10 310,40 Q320,30 350,45 Q370,25 390,45 Q400,35 420,50 Q460,40 500,45 Q520,33 540,60 Q560,45 600,60 L600,80 Z' fill='%2338643A' opacity='0.25'/%3E%3C/svg%3E");
}

/* Mountain Hero Banner */
.mountain-hero {
    background: linear-gradient(135deg, var(--logo-green) 0%, var(--logo-brown) 100%);
    color: var(--logo-white);
    padding: 60px 0 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.mountain-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 80' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,80 L0,60 Q20,55 40,65 Q60,50 110,50 Q120,40 140,42 Q170,38 170,55 Q200,37 230,50 Q250,30 260,37 Q280,10 310,40 Q320,30 350,45 Q370,25 390,45 Q400,35 420,50 Q460,40 500,45 Q520,33 540,60 Q560,45 600,60 L600,80 Z' fill='%23F8F4EA'/%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: repeat-x;
    background-position: bottom;
    z-index: 1;
}

.mountain-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--logo-white);
    position: relative;
    z-index: 2;
}

.mountain-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Mountain Silhouette Background */
.mountain-background {
  position: relative;
  overflow: hidden;
}

.mountain-background::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 80' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,80 L0,60 Q20,55 40,65 Q60,50 110,50 Q120,40 140,42 Q170,38 170,55 Q200,37 230,50 Q250,30 260,37 Q280,10 310,40 Q320,30 350,45 Q370,25 390,45 Q400,35 420,50 Q460,40 500,45 Q520,33 540,60 Q560,45 600,60 L600,80 Z' fill='%2338643A' opacity='0.17'/%3E%3C/svg%3E");
  background-size: cover;
  background-repeat: repeat-x;
  background-position: bottom;
  z-index: -1;
}

/* Fonts and Base Styling */
body {
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  background: linear-gradient(180deg, var(--logo-beige) 0%, #f5f2e8 100%) !important;
  color: var(--logo-brown) !important;
  margin: 0 !important;
  padding: 0 !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
  position: relative;
}

h1, h2, h3, .logo h1 {
  font-family: 'Playfair Display', 'Times New Roman', serif;
  color: var(--logo-green);
}

/* Header/Nav Styling */
header, nav {
  background: linear-gradient(120deg, var(--logo-green) 60%, var(--logo-beige) 100%);
  color: var(--logo-white);
}

.nav-links a {
  color: var(--logo-white);
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 24px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover {
  background: var(--logo-yellow);
  color: var(--logo-brown);
}

#logout-btn {
  background: var(--logo-brown);
  color: var(--logo-white);
}

/* Card Styling */
.kpi-card, .dashboard-card {
  background: var(--logo-white);
  border: 2px solid var(--logo-green);
  border-radius: 16px;
  color: var(--logo-green);
}

/* Button Styling */
.btn-primary {
  background: var(--logo-green);
  color: var(--logo-white);
  border-radius: 8px;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--logo-brown);
  color: var(--logo-yellow);
  transform: translateY(-2px);
}

/* Override for header-free pages */
* {
    margin: 0;
    padding: 0;
}

/* Responsive body margin for stacked header */
@media (max-width: 1200px) {
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 900px) {
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 700px) {
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 600px) {
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Section spacing - start from top */
.records-section,
.dashboard-section {
    padding-top: 0 !important;
    margin-top: 0 !important;
    position: relative;
    top: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--logo-beige) 0%, #f5f2e8 100%);
}

.records-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 80' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,80 L0,60 Q20,55 40,65 Q60,50 110,50 Q120,40 140,42 Q170,38 170,55 Q200,37 230,50 Q250,30 260,37 Q280,10 310,40 Q320,30 350,45 Q370,25 390,45 Q400,35 420,50 Q460,40 500,45 Q520,33 540,60 Q560,45 600,60 L600,80 Z' fill='%2338643A' opacity='0.08'/%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: repeat-x;
    background-position: bottom;
    z-index: 0;
    pointer-events: none;
}

.records-section .container,
.dashboard-section .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    position: relative;
    z-index: 1;
}

.records-section h2,
.dashboard-section h2 {
    margin-top: 0 !important;
    padding-top: 0.5rem;
}

/* Ensure main content starts at top */
#main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
    top: 0;
}

/* Override any fixed header spacing */
main {
    margin-top: 0 !important;
    padding-top: 0 !important;
    position: relative;
    top: 0;
}

/* Force all sections to start at top */
section {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove any inherited spacing */
.container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure section controls are visible */
.section-controls,
.contact-filters,
.task-filters,
.reminder-filters,
.financial-tabs {
    margin-top: 1.5rem;
}

/* Responsive section spacing */
@media (max-width: 1200px) {
    .records-section,
    .dashboard-section {
        padding-top: 4rem !important;
    }
    
    .records-section .container,
    .dashboard-section .container {
        padding-top: 1.5rem;
    }
}

@media (max-width: 900px) {
    .records-section,
    .dashboard-section {
        padding-top: 4.5rem !important;
    }
    
    .records-section .container,
    .dashboard-section .container {
        padding-top: 2rem;
    }
}

@media (max-width: 700px) {
    .records-section,
    .dashboard-section {
        padding-top: 5rem !important;
    }
    
    .records-section .container,
    .dashboard-section .container {
        padding-top: 2.5rem;
    }
}

@media (max-width: 600px) {
    .records-section,
    .dashboard-section {
        padding-top: 4.5rem !important;
    }
    
    .records-section .container,
    .dashboard-section .container {
        padding-top: 2rem;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(54, 98, 58, 0.6);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--logo-white);
    padding: 30px;
    border: 2px solid var(--logo-green);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(54, 98, 58, 0.3);
}

.modal-content h2 {
    margin-bottom: 20px;
    color: var(--logo-green);
    font-family: 'Playfair Display', serif;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 2px solid var(--logo-beige);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    background: var(--logo-white);
    color: var(--logo-brown);
    transition: border-color 0.3s ease;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--logo-green);
    box-shadow: 0 0 0 3px rgba(56, 100, 58, 0.1);
}

.modal-content textarea {
    height: 80px;
    resize: vertical;
}

.modal-buttons, .form-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.modal-buttons button, .form-actions button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-buttons button[type="submit"], .btn-primary {
    background-color: var(--logo-green);
    color: var(--logo-white);
}

.modal-buttons button[type="submit"]:hover, .btn-primary:hover {
    background-color: var(--logo-brown);
    color: var(--logo-yellow);
    transform: translateY(-2px);
}

.modal-buttons button[type="button"], .btn-secondary {
    background-color: var(--logo-brown);
    color: var(--logo-white);
}

.modal-buttons button[type="button"]:hover, .btn-secondary:hover {
    background-color: var(--logo-blue);
    color: var(--logo-white);
}

.login-note {
    margin-top: 15px;
    font-size: 14px;
    color: var(--logo-brown);
    text-align: center;
    background: var(--logo-beige);
    padding: 8px;
    border-radius: 8px;
}

/* Enhanced Login Modal Styles */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--logo-green);
    margin-bottom: 10px;
    font-size: 2rem;
}

.login-header p {
    color: var(--logo-brown);
    font-size: 1rem;
    opacity: 0.8;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--logo-brown);
    font-weight: 600;
    font-size: 0.9rem;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--logo-green), #2d5a2f);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 100, 58, 0.2);
}

.login-btn:hover {
    background: linear-gradient(135deg, #2d5a2f, var(--logo-green));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 100, 58, 0.3);
}

.login-help {
    margin-top: 25px;
    border-top: 2px solid var(--logo-beige);
    padding-top: 20px;
}

.demo-credentials {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--logo-green);
}

.demo-credentials h4 {
    color: var(--logo-green);
    margin-bottom: 10px;
    font-size: 1rem;
}

.cred-box {
    background: white;
    padding: 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--logo-brown);
    border: 1px solid #d4edda;
}

.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.demo-btn, .auto-fill-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--logo-green);
    border-radius: 8px;
    background: white;
    color: var(--logo-green);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.demo-btn:hover {
    background: var(--logo-green);
    color: white;
    transform: translateY(-1px);
}

.auto-fill-btn:hover {
    background: var(--logo-blue);
    border-color: var(--logo-blue);
    color: white;
    transform: translateY(-1px);
}

.login-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.login-info p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: var(--logo-brown);
}

.login-info strong {
    color: var(--logo-green);
}

/* Mobile responsiveness for login modal */
@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
        margin: 20px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .demo-btn, .auto-fill-btn {
        flex: none;
        width: 100%;
    }
    
    .login-header h2 {
        font-size: 1.6rem;
    }
}

/* Dashboard Styles */
.dashboard-section {
    padding: 60px 0 40px 0;
    background: linear-gradient(180deg, var(--logo-beige) 0%, #f5f2e8 100%);
    position: relative;
    overflow: hidden;
}

.dashboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 80' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,80 L0,60 Q20,55 40,65 Q60,50 110,50 Q120,40 140,42 Q170,38 170,55 Q200,37 230,50 Q250,30 260,37 Q280,10 310,40 Q320,30 350,45 Q370,25 390,45 Q400,35 420,50 Q460,40 500,45 Q520,33 540,60 Q560,45 600,60 L600,80 Z' fill='%2338643A' opacity='0.12'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: top;
    transform: scaleY(-1);
    z-index: 0;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.dashboard-header h2 {
    color: var(--logo-green);
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
}

.dashboard-header .slogan {
    color: var(--logo-brown);
    font-style: italic;
    font-size: 18px;
    font-weight: 500;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: var(--logo-white);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(54, 98, 58, 0.15);
    border: 2px solid var(--logo-green);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(54, 98, 58, 0.25);
}

.kpi-card {
    background: linear-gradient(135deg, var(--logo-green) 0%, var(--logo-brown) 100%);
    color: var(--logo-white);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(54, 98, 58, 0.3);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(54, 98, 58, 0.4);
}

.kpi-card .icon {
    font-size: 3rem;
    opacity: 0.9;
}

.kpi-card .content h3 {
    font-size: 2.5rem;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.kpi-card .content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

/* Additional Styling */
.settings-section {
    background: var(--logo-white);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 16px;
    border: 2px solid var(--logo-green);
    box-shadow: 0 4px 20px rgba(54, 98, 58, 0.1);
}

.settings-section h3 {
    color: var(--logo-green);
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.notification-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--logo-beige);
    border-radius: 8px;
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.role-card {
    background: var(--logo-white);
    padding: 20px;
    border-radius: 16px;
    border: 2px solid var(--logo-green);
    box-shadow: 0 4px 15px rgba(54, 98, 58, 0.1);
}

.role-card h4 {
    color: var(--logo-green);
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.permissions-list {
    margin: 15px 0;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 5px;
}

.system-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    background: var(--logo-beige);
    padding: 20px;
    border-radius: 12px;
}

.backup-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.backup-status {
    background: var(--logo-beige);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.kpi-icon {
    font-size: 2.5em;
    opacity: 0.9;
}

.kpi-content h3 {
    margin: 0;
    font-size: 2em;
    font-weight: bold;
}

.kpi-content p {
    margin: 5px 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.kpi-content small {
    font-size: 0.9em;
    opacity: 0.8;
}

.dashboard-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.dashboard-card p {
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
}

/* Records Section Styles */
.records-section {
    padding: 40px 0;
    min-height: 100vh;
}

.records-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.records-table {
    overflow-x: auto;
    margin: 20px 0;
}

.records-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--logo-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(54, 98, 58, 0.15);
    border: 2px solid var(--logo-green);
}

.records-table th,
.records-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid var(--logo-beige);
    font-family: 'Montserrat', sans-serif;
}

.records-table th {
    background: linear-gradient(120deg, var(--logo-green) 0%, var(--logo-brown) 100%);
    color: var(--logo-white);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.records-table td {
    color: var(--logo-brown);
    font-weight: 500;
}

.records-table tr:hover {
    background-color: var(--logo-beige);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

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

/* Action Buttons */
.action-btn {
    background: none;
    border: 2px solid var(--logo-green);
    color: var(--logo-green);
    padding: 6px 12px;
    margin: 2px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--logo-green);
    color: var(--logo-white);
    transform: translateY(-1px);
}

.action-btn.edit {
    border-color: var(--logo-blue);
    color: var(--logo-blue);
}

.action-btn.edit:hover {
    background: var(--logo-blue);
    color: var(--logo-white);
}

.action-btn.delete {
    border-color: #e74c3c;
    color: #e74c3c;
}

.action-btn.delete:hover {
    background: #e74c3c;
    color: var(--logo-white);
}

/* Status Badges */
.status-active, .role-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: var(--logo-green);
    color: var(--logo-white);
}

.status-inactive {
    background: var(--logo-brown);
    color: var(--logo-white);
}

.role-badge.administrator {
    background: var(--logo-green);
    color: var(--logo-white);
}

.role-badge.farm-manager {
    background: var(--logo-blue);
    color: var(--logo-white);
}

.role-badge.veterinarian {
    background: var(--logo-yellow);
    color: var(--logo-brown);
}

.role-badge.accountant {
    background: var(--logo-brown);
    color: var(--logo-white);
}

/* Form Groups and Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--logo-green);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    border-bottom: 2px solid var(--logo-green);
    background: linear-gradient(135deg, var(--logo-white) 0%, var(--logo-beige) 100%);
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 80' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,80 L0,60 Q20,55 40,65 Q60,50 110,50 Q120,40 140,42 Q170,38 170,55 Q200,37 230,50 Q250,30 260,37 Q280,10 310,40 Q320,30 350,45 Q370,25 390,45 Q400,35 420,50 Q460,40 500,45 Q520,33 540,60 Q560,45 600,60 L600,80 Z' fill='%2338643A' opacity='0.25'/%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: repeat-x;
    background-position: bottom;
    z-index: 0;
}

.section-header h2 {
    color: var(--logo-green);
    font-family: 'Playfair Display', serif;
    margin: 0;
    position: relative;
    z-index: 1;
}

.section-header .btn {
    position: relative;
    z-index: 1;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--logo-beige);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--logo-brown);
    font-weight: 600;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--logo-green);
    color: var(--logo-white);
}

.tab-btn:hover:not(.active) {
    background: var(--logo-beige);
    color: var(--logo-green);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.action-btn:hover {
    opacity: 0.8;
}

/* Navigation adjustments */
.nav-links button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.nav-links button:hover {
    background-color: #c0392b;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-state h3 {
    margin-bottom: 10px;
}

.empty-state p {
    margin-bottom: 20px;
}

/* CRM/Contact Management Styles */
.contact-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-filters input,
.contact-filters select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 200px;
}

.contact-filters input[type="search"] {
    flex: 1;
    min-width: 250px;
}

.contact-filters select {
    background-color: white;
    cursor: pointer;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.contact-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.contact-type {
    display: inline-block;
    background-color: #3498db;
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.contact-type.supplier {
    background-color: #27ae60;
}

.contact-type.customer {
    background-color: #3498db;
}

.contact-type.veterinarian {
    background-color: #e74c3c;
}

.contact-type.worker {
    background-color: #f39c12;
}

.contact-type.other {
    background-color: #95a5a6;
}

.contact-info {
    margin-bottom: 15px;
}

.contact-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.contact-info strong {
    color: #2c3e50;
}

.contact-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.contact-actions .action-btn {
    flex: 1;
    text-align: center;
    font-size: 12px;
    padding: 8px 12px;
}

.contact-notes {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    border-left: 3px solid #3498db;
}

.contact-notes p {
    margin: 0;
    font-size: 13px;
    color: #555;
    font-style: italic;
}

/* Contact Modal Specific Styles */
.contact-modal .modal-content {
    max-width: 600px;
}

.contact-modal .form-group {
    margin-bottom: 15px;
}

.contact-modal label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.contact-modal input,
.contact-modal select,
.contact-modal textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
}

.contact-modal textarea {
    min-height: 100px;
    resize: vertical;
}

.contact-modal .form-row {
    display: flex;
    gap: 15px;
}

.contact-modal .form-row .form-group {
    flex: 1;
}

/* No contacts message */
.no-contacts {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.no-contacts h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.no-contacts p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* Enhanced Dashboard Styles */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    text-align: center;
}

/* Enhanced Modal Styles */
.large-modal {
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
}

.form-tabs {
    display: flex;
    border-bottom: 2px solid #ecf0f1;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #7f8c8d;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
}

.tab-btn:hover {
    background: #f8f9fa;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

/* Search and Filter Styles */
.search-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    background: #f8f9fa;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
}

/* Statistics Cards */
.goat-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    opacity: 0.9;
}

.stat-card p {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

/* Section Controls */
.section-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

/* Reports Styles */
.report-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.report-category {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.report-category h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
}

.report-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.report-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
}

.custom-report-builder {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.report-builder-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.export-options {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-btn {
    padding: 12px 20px;
    border: 2px solid #3498db;
    background: white;
    color: #3498db;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: #3498db;
    color: white;
}

/* Activity and Alerts */
.recent-activity, .urgent-alerts {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.activity-list, .alert-list {
    max-height: 200px;
    overflow-y: auto;
}

.activity-item, .alert-item {
    padding: 10px;
    border-left: 4px solid #3498db;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.alert-item {
    border-left-color: #e74c3c;
}

/* Financial Tabs */
.financial-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.financial-summary {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pl-grid, .balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.pl-section, .balance-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.breakeven-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.breakeven-results {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

/* Photo Preview */
#photo-preview {
    margin-top: 10px;
    max-width: 200px;
    max-height: 200px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-size: 14px;
}

#photo-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

/* Breeding Focus Styling */
.breeding-focus {
    background: linear-gradient(135deg, #8b4513 0%, #d2691e 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: center;
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.3);
}

.breeding-focus h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.breeding-focus p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.breeding-focus-banner {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
    border: 3px solid #8b4513;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.3);
}

.breeding-focus-banner h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #d2691e;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.breeding-focus-banner p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Welcome notification animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .records-table {
        font-size: 14px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-filters input,
    .contact-filters select {
        min-width: 100%;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-modal .form-row {
        flex-direction: column;
    }
    
    .contact-actions {
        flex-direction: column;
    }
    
    .contact-actions .action-btn {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .contact-card {
        padding: 15px;
    }
    
    .contact-card h3 {
        font-size: 16px;
    }
    
    .contact-info p {
        font-size: 13px;
    }
    
    .contact-modal .modal-content {
        padding: 15px;
    }
}

/* ===== ENHANCED BRANDING & LOGIN MODAL ===== */

/* Login Modal Branding */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--logo-green);
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(56, 100, 58, 0.3);
    border: 3px solid var(--logo-green);
}

.login-header h2 {
    color: var(--logo-green);
    font-family: 'Playfair Display', serif;
    margin: 0.5rem 0;
    font-size: 1.8rem;
}

.login-header p {
    color: var(--logo-brown);
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.8;
}

/* Enhanced Logo Styling in Navigation */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--logo-yellow);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    font-family: 'Playfair Display', serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

/* Enhanced Navigation */
header {
    background: linear-gradient(135deg, var(--logo-green) 0%, var(--logo-brown) 100%);
    border-bottom: 3px solid var(--logo-yellow);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.nav-links a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--logo-yellow);
}

.nav-links a.active {
    background: var(--logo-yellow);
    color: var(--logo-brown);
    font-weight: 600;
}

/* Farm Slogan & Footer */
.farm-slogan {
    text-align: center;
    color: var(--logo-brown);
    font-style: italic;
    font-size: 0.9rem;
    margin: 1rem 0;
    opacity: 0.8;
}

.farm-footer {
    background: linear-gradient(135deg, var(--logo-brown) 0%, var(--logo-green) 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 3px solid var(--logo-yellow);
}

.farm-footer .farm-slogan {
    color: var(--logo-yellow);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 1;
}

/* Mountain Divider Enhancement */
.mountain-divider-enhanced {
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 600 80' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cpath d='M0,80 L0,50 Q30,45 60,55 Q90,40 120,50 Q150,35 180,45 Q210,30 240,40 Q270,25 300,35 Q330,20 360,30 Q390,15 420,25 Q450,10 480,20 Q510,5 540,15 Q570,0 600,10 L600,80 Z' fill='%2338643A' opacity='0.8'/%3E%3Cpath d='M0,80 L0,60 Q40,55 80,65 Q120,50 160,60 Q200,45 240,55 Q280,40 320,50 Q360,35 400,45 Q440,30 480,40 Q520,25 560,35 Q580,20 600,30 L600,80 Z' fill='%23635240' opacity='0.6'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: cover;
    margin: 2rem 0;
    position: relative;
}

.mountain-divider-enhanced::after {
    content: "🏔️ From the foothills of Mount Kenya 🏔️";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--logo-brown);
    font-weight: 500;
    border: 1px solid var(--logo-green);
}

/* Tax Overview Dashboard */
.tax-overview {
    margin: 2rem 0;
}

.tax-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tax-summary .summary-card {
    background: linear-gradient(135deg, var(--logo-white) 0%, var(--logo-beige) 100%);
    border: 2px solid var(--logo-green);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(56, 100, 58, 0.1);
    transition: all 0.3s ease;
}

.tax-summary .summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(56, 100, 58, 0.2);
}

.tax-summary .summary-card.income {
    border-color: #27ae60;
    background: linear-gradient(135deg, #d5f4e6 0%, #ffffff 100%);
}

.tax-summary .summary-card.deductions {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fdeaea 0%, #ffffff 100%);
}

.tax-summary .summary-card.vat {
    border-color: #3498db;
    background: linear-gradient(135deg, #eaf4fd 0%, #ffffff 100%);
}

.tax-summary .summary-card.tax-due {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fef5e7 0%, #ffffff 100%);
}

.tax-summary .summary-card h3 {
    color: var(--logo-green);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tax-summary .summary-amount {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--logo-brown);
    margin: 0.5rem 0;
}

.tax-summary .period {
    font-size: 0.85rem;
    color: #666;
    opacity: 0.8;
}

/* Tax Actions */
.tax-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.tax-actions button {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Tax Tabs */
.tax-tabs {
    display: flex;
    background: var(--logo-beige);
    border-radius: 10px;
    padding: 0.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    gap: 0.5rem;
}

.tax-tabs .tab-btn {
    background: transparent;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--logo-brown);
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tax-tabs .tab-btn.active {
    background: var(--logo-green);
    color: white;
    box-shadow: 0 2px 8px rgba(56, 100, 58, 0.3);
}

.tax-tabs .tab-btn:hover:not(.active) {
    background: rgba(56, 100, 58, 0.1);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.tab-header h3 {
    color: var(--logo-green);
    font-size: 1.5rem;
    margin: 0;
}

/* VAT Summary Cards */
.vat-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.vat-card {
    background: linear-gradient(135deg, var(--logo-blue) 0%, #ffffff 100%);
    border: 2px solid var(--logo-blue);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 3px 12px rgba(135, 181, 222, 0.2);
}

.vat-card h4 {
    color: var(--logo-green);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.vat-amount {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--logo-brown);
    margin: 0;
}

/* PAYE Summary Cards */
.paye-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.paye-card {
    background: linear-gradient(135deg, var(--logo-yellow) 0%, #ffffff 100%);
    border: 2px solid var(--logo-yellow);
    border-radius: 10px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 3px 12px rgba(233, 201, 124, 0.2);
}

.paye-card h4 {
    color: var(--logo-green);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.paye-amount {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--logo-brown);
    margin: 0;
}

/* Filters */
.income-filters,
.expense-filters {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.income-filters select,
.expense-filters select,
.income-filters input,
.expense-filters input {
    padding: 0.6rem;
    border: 2px solid var(--logo-beige);
    border-radius: 6px;
    background: white;
    color: var(--logo-brown);
}

.income-filters select:focus,
.expense-filters select:focus,
.income-filters input:focus,
.expense-filters input:focus {
    border-color: var(--logo-green);
    outline: none;
}

/* VAT Info */
.vat-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-badge {
    background: var(--logo-green);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* VAT Actions */
.vat-actions {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

/* Returns Section */
.returns-list {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

.return-card {
    background: white;
    border: 2px solid var(--logo-beige);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.return-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.return-header h4 {
    color: var(--logo-green);
    margin: 0;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.completed {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.return-details p {
    margin: 0.3rem 0;
    color: #666;
}

.return-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Compliance Section */
.compliance-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.compliance-card {
    background: white;
    border: 2px solid var(--logo-beige);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.compliance-card.good {
    border-color: #27ae60;
    background: linear-gradient(135deg, #d5f4e6 0%, #ffffff 100%);
}

.compliance-card.agricultural {
    border-color: var(--logo-green);
    background: linear-gradient(135deg, var(--logo-beige) 0%, #ffffff 100%);
}

.compliance-card h4 {
    color: var(--logo-green);
    margin-bottom: 0.5rem;
}

/* Agricultural Benefits Section */
.agricultural-benefits {
    background: linear-gradient(135deg, var(--logo-beige) 0%, #ffffff 100%);
    border: 2px solid var(--logo-green);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.agricultural-benefits h4 {
    color: var(--logo-green);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

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

.benefit-card {
    background: white;
    border: 2px solid var(--logo-green);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(56, 100, 58, 0.1);
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(56, 100, 58, 0.15);
}

.benefit-card h5 {
    color: var(--logo-brown);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.benefit-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-card li {
    padding: 0.3rem 0;
    color: #555;
    position: relative;
    padding-left: 1.2rem;
}

.benefit-card li:before {
    content: "🌾";
    position: absolute;
    left: 0;
    top: 0.3rem;
}

/* Agricultural Calendar Items */
.calendar-item.agricultural {
    background: linear-gradient(135deg, var(--logo-green) 0%, #ffffff 100%);
    border: 2px solid var(--logo-green);
    color: white;
}

.calendar-item.agricultural .date {
    color: var(--logo-yellow);
    font-weight: bold;
}

.calendar-item.agricultural .event {
    color: white;
}

/* Tax Calendar */
.tax-calendar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 2px solid var(--logo-beige);
}

.tax-calendar h4 {
    color: var(--logo-green);
    margin-bottom: 1rem;
}

.calendar-items {
    display: grid;
    gap: 1rem;
}

.calendar-item {
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--logo-beige);
    border-radius: 8px;
}

.calendar-item .date {
    font-weight: 600;
    color: var(--logo-brown);
}

.calendar-item .event {
    color: var(--logo-green);
}

.calendar-item .status {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.upcoming {
    background: #fff3cd;
    color: #856404;
}

.status.future {
    background: #d1ecf1;
    color: #0c5460;
}

/* Tax Analytics */
.tax-analytics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.tax-analytics .chart-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--logo-beige);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tax-analytics h3 {
    color: var(--logo-green);
    margin-bottom: 1rem;
    text-align: center;
}

/* Tax Calculator Modal */
.calculator-form {
    display: grid;
    gap: 1.5rem;
}

.calc-section {
    background: var(--logo-beige);
    padding: 1.5rem;
    border-radius: 10px;
}

.calc-section.agricultural-calc {
    background: linear-gradient(135deg, var(--logo-green) 0%, var(--logo-beige) 100%);
    border: 2px solid var(--logo-green);
}

.calc-section.agricultural-calc h3 {
    color: white;
    margin-bottom: 1rem;
}

.calc-section h3 {
    color: var(--logo-green);
    margin-bottom: 1rem;
}

.calc-section input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 2px solid var(--logo-green);
    border-radius: 6px;
}

.farm-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.farm-info p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0;
    color: var(--logo-brown);
}

.farm-info input {
    width: 150px;
    margin: 0;
    margin-left: 0.5rem;
}

.exemption-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.exemption-info label {
    display: block;
    margin: 0.5rem 0;
    color: var(--logo-brown);
    cursor: pointer;
}

.exemption-info input[type="checkbox"] {
    width: auto;
    margin: 0 0.5rem 0 0;
}

.calc-result {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--logo-green);
}

.calc-result.agricultural-result {
    background: linear-gradient(135deg, #f8f9fa 0%, var(--logo-beige) 100%);
    border: 3px solid var(--logo-green);
}

.calc-result p {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    color: var(--logo-brown);
}

.calc-result .total-tax {
    font-size: 1.2rem;
    font-weight: bold;
    border-top: 2px solid var(--logo-green);
    padding-top: 0.5rem;
    margin-top: 1rem;
    color: var(--logo-green);
}

.tax-notes {
    background: var(--logo-yellow);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid var(--logo-brown);
}

.tax-notes small {
    color: var(--logo-brown);
    line-height: 1.4;
}

/* Mobile Responsiveness for Tax Records */
@media (max-width: 768px) {
    .tax-summary {
        grid-template-columns: 1fr;
    }
    
    .tax-actions {
        flex-direction: column;
    }
    
    .tax-tabs {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .tab-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .calendar-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }
    
    .vat-summary,
    .paye-summary {
        grid-template-columns: 1fr;
    }
    
    .compliance-status {
        grid-template-columns: 1fr;
    }
    
    .tax-analytics {
        grid-template-columns: 1fr;
    }
    
    .income-filters,
    .expense-filters {
        flex-direction: column;
    }
}

/* Professional Footer Styles */
.farm-footer {
    background: linear-gradient(135deg, var(--logo-green), var(--logo-brown));
    color: white;
    margin-top: 3rem;
    padding: 2rem 0 0;
    position: relative;
}

.farm-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #38643A, #F8F4EA, #635240);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: var(--logo-beige);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo-img {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    border-radius: 50%;
    border: 2px solid var(--logo-beige);
}

.footer-logo h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.farm-motto {
    font-style: italic;
    color: var(--logo-beige);
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.farm-location {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--logo-beige);
    padding-left: 5px;
}

.contact-info p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.contact-info i {
    margin-right: 0.5rem;
    color: var(--logo-beige);
    width: 16px;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    margin-top: 2rem;
    padding: 1rem 0;
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-certifications {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.certification-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    border: 1px solid var(--logo-beige);
    color: var(--logo-beige);
}

/* Mobile Footer Responsiveness */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-certifications {
        justify-content: center;
    }
}

/* ===============================================
   BULK OPERATIONS STYLING
   =============================================== */

.bulk-operations-panel {
    background: linear-gradient(135deg, rgba(56, 100, 58, 0.05), rgba(99, 82, 64, 0.05));
    border: 2px solid var(--logo-green);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(56, 100, 58, 0.1);
}

.bulk-operations-panel h3 {
    color: var(--logo-green);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.bulk-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bulk-selection {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(56, 100, 58, 0.2);
}

.selection-counter {
    background: var(--logo-green);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.bulk-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.bulk-action-group {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--logo-green);
}

.bulk-action-group label {
    display: block;
    font-weight: 600;
    color: var(--logo-brown);
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bulk-btn {
    background: white;
    border: 2px solid;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0.3rem 0.3rem 0.3rem 0;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.bulk-btn.health {
    border-color: #e74c3c;
    color: #e74c3c;
}

.bulk-btn.health:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.bulk-btn.status {
    border-color: #3498db;
    color: #3498db;
}

.bulk-btn.status:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.bulk-btn.location {
    border-color: #f39c12;
    color: #f39c12;
}

.bulk-btn.location:hover {
    background: #f39c12;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.bulk-btn.record {
    border-color: var(--logo-green);
    color: var(--logo-green);
}

.bulk-btn.record:hover {
    background: var(--logo-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 100, 58, 0.3);
}

.bulk-btn.danger {
    border-color: #c0392b;
    color: #c0392b;
}

.bulk-btn.danger:hover {
    background: #c0392b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
}

.bulk-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Enhanced Table with Checkboxes */
.records-table table th:first-child,
.records-table table td:first-child {
    width: 40px;
    text-align: center;
    padding: 0.5rem;
}

.records-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--logo-green);
}

.records-table tr.selected {
    background-color: rgba(56, 100, 58, 0.1);
    border-left: 4px solid var(--logo-green);
}

.records-table tr.selected td {
    border-color: rgba(56, 100, 58, 0.2);
}

/* Bulk Modal Enhancements */
.modal .checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    margin: 1rem 0;
}

.modal .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal .checkbox-group label:hover {
    background-color: rgba(56, 100, 58, 0.05);
}

.modal .checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--logo-green);
}

/* Individual Weight Inputs */
.individual-weight-inputs {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    background: #f9f9f9;
}

.weight-input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.weight-input-row label {
    flex: 1;
    font-weight: 500;
    color: var(--logo-brown);
}

.weight-input-row input {
    width: 80px;
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

/* Progress Indicators for Bulk Operations */
.bulk-progress {
    background: white;
    border: 2px solid var(--logo-green);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    display: none;
}

.bulk-progress.active {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--logo-green), #4CAF50);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: var(--logo-brown);
    margin-top: 0.5rem;
}

/* Mobile Responsiveness for Bulk Operations */
@media (max-width: 768px) {
    .bulk-operations-panel {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .bulk-selection {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .bulk-actions {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .bulk-action-group {
        padding: 0.8rem;
    }
    
    .bulk-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        margin: 0.2rem;
    }
    
    .modal .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .weight-input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .weight-input-row input {
        width: 100%;
    }
}

/* Animation for Bulk Operations */
@keyframes bulkSuccess {
    0% { background-color: transparent; }
    50% { background-color: rgba(76, 175, 80, 0.2); }
    100% { background-color: transparent; }
}

.bulk-operation-success {
    animation: bulkSuccess 1s ease-in-out;
}

/* Bulk Operation Confirmation */
.bulk-confirmation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    color: #856404;
}

.bulk-confirmation strong {
    color: #721c24;
}

.bulk-confirmation ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.bulk-confirmation li {
    margin-bottom: 0.3rem;
}

/* Success Message Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
