/* CSS Reset and Variables */
:root {
    --bg-primary: #070b13;
    --bg-secondary: #0c111e;
    --bg-card: rgba(20, 27, 45, 0.35);
    --bg-card-hover: rgba(30, 42, 68, 0.45);
    
    --primary: #06b6d4;
    --primary-hover: #22d3ee;
    --primary-glow: rgba(6, 182, 212, 0.2);
    
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.15);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.15);
    
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.15);
    
    --purple: #8b5cf6;
    --purple-glow: rgba(139, 92, 246, 0.15);

    --text-main: #f8fafc;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(6, 182, 212, 0.35);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom premium scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.5;
    position: relative;
}

/* Ambient glowing orbs */
.ambient-glow-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(130px);
    opacity: 0.16;
    mix-blend-mode: screen;
    animation: floatGlow 30s infinite ease-in-out;
}
.orb-cyan {
    width: 40vw;
    height: 40vw;
    top: -10vw;
    left: -10vw;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.45) 0%, rgba(6, 182, 212, 0.03) 70%, transparent 100%);
    animation-duration: 35s;
}
.orb-purple {
    width: 45vw;
    height: 45vw;
    bottom: -10vw;
    right: -10vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, rgba(139, 92, 246, 0.03) 70%, transparent 100%);
    animation-duration: 40s;
    animation-delay: -5s;
}
.orb-emerald {
    width: 30vw;
    height: 30vw;
    top: 30vh;
    right: 20vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.02) 75%, transparent 100%);
    animation-duration: 28s;
    animation-delay: -10s;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(2vw, 3vh) scale(1.05);
    }
    66% {
        transform: translate(-1vw, -2vh) scale(0.96);
    }
}

/* Background Bubble Styles */
.bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -50px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 60%, rgba(6, 182, 212, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.2), 0 0 8px rgba(6, 182, 212, 0.1);
    animation: rise 15s infinite linear;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-120vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* App Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 16px 12px;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: 20px;
    padding: 0 8px;
}

.brand-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px var(--primary-glow);
}

.brand-tagline {
    font-size: 0.55rem;
    color: #ffd700; /* Gold */
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.95;
    padding-left: 56px;
    white-space: nowrap;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.25);
}

.brand-subtagline {
    font-size: 0.52rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding-left: 56px;
    margin-top: 1px;
    display: block;
    opacity: 0.85;
}

/* Animated Logo Parts */
.fish-logo-svg {
    width: 44px;
    height: 24px;
    overflow: visible;
    animation: logoGlow 3s ease-in-out infinite;
}

.logo-tail {
    transform-origin: 25px 20px;
    animation: waveTail 1.6s ease-in-out infinite;
}

.logo-body, .logo-cutout {
    transform-origin: 45px 20px;
    animation: swimBody 3.2s ease-in-out infinite;
}

.logo-fin {
    transform-origin: 40px 7px;
    animation: waveFin 2.4s ease-in-out infinite;
}

/* Hover Excited State */
.logo:hover .logo-tail {
    animation: waveTail 0.5s ease-in-out infinite;
}

.logo:hover .logo-body, .logo:hover .logo-cutout {
    animation: swimBody 1s ease-in-out infinite;
}

.logo:hover .logo-fin {
    animation: waveFin 0.8s ease-in-out infinite;
}

@keyframes waveTail {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-12deg) skewY(-2deg); }
}

@keyframes swimBody {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-1.2px) rotate(1.5deg); }
}

@keyframes waveFin {
    0%, 100% { transform: rotate(0deg) scaleY(1); }
    50% { transform: rotate(5deg) scaleY(0.9); }
}

@keyframes logoGlow {
    0%, 100% { 
        filter: drop-shadow(0 0 3px rgba(6, 182, 212, 0.4)); 
    }
    50% { 
        filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.85)) drop-shadow(0 0 2px rgba(59, 130, 246, 0.5)); 
    }
}

.badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom scrollbar for sidebar menu */
.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.3);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.menu-item:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.02);
}

.menu-item.active {
    color: var(--text-main);
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, rgba(6, 182, 212, 0.02) 100%);
    border-left: 3px solid var(--primary);
    border-radius: 0 12px 12px 0;
    box-shadow: inset 0 0 12px rgba(6, 182, 212, 0.05);
}

.menu-item i {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
}

.menu-item.active i {
    color: var(--primary);
    filter: drop-shadow(0 0 4px var(--primary-glow));
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Content Styling */
.main-content {
    padding: 32px 40px;
    overflow-y: auto;
    max-height: 100vh;
    perspective: 1200px;
    z-index: 1;
    position: relative;
}

/* Top Header */
.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.header-title h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.85rem;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 500;
}

.date-display i {
    color: var(--primary);
}

/* Tab Contents Toggle */
.tab-content {
    display: none;
    animation: fadeIn var(--transition-normal);
}

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

/* Card Components */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: border 0.3s, transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s;
    transform-style: preserve-3d;
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px) rotateX(1deg) rotateY(0.5deg);
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.12), inset 0 0 12px rgba(6, 182, 212, 0.05);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Stat Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color var(--transition-fast), box-shadow 0.4s;
    transform-style: preserve-3d;
}

.stat-card:hover {
    transform: translateY(-6px) rotateX(1.5deg) rotateY(-1deg);
    border-color: var(--border-hover);
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.22), inset 0 0 12px rgba(6, 182, 212, 0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.icon-cyan {
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.icon-blue {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.icon-emerald {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.icon-purple {
    background: var(--purple-glow);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2px 0;
}

.stat-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-cyan { color: var(--primary); }
.text-purple { color: var(--purple); }
.hidden { display: none !important; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }

/* Grid / Row Layouts */
.content-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1100px) {
    .content-row {
        grid-template-columns: 1fr;
    }
}

.card-wide {
    grid-column: span 1;
}

/* Tables CSS */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.table th {
    padding: 14px 16px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

.table tbody tr {
    transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Water status indicator */
.water-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.status-optimal {
    background-color: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.status-danger {
    background-color: var(--danger-glow);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.status-warning {
    background-color: var(--warning-glow);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

/* Buttons styling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 12px var(--primary-glow);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-emerald {
    background-color: var(--success);
    color: #000;
}

.btn-emerald:hover {
    background-color: #059669;
    box-shadow: 0 0 12px var(--success-glow);
}

.btn-danger {
    background-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 0 12px var(--danger-glow);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

.btn-tab {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
}

.btn-tab.active {
    background-color: var(--primary-glow);
    color: var(--primary);
    border-color: rgba(6, 182, 212, 0.3);
}

/* Section Actions Header */
.section-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    gap: 8px;
}

/* Ponds Grid Layout */
.ponds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.pond-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
}

.pond-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--text-muted);
}

.pond-card.active::before {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.pond-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.pond-card-header {
    padding: 20px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pond-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
}

.pond-status-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.tag-active {
    background-color: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.tag-empty {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.pond-card-body {
    padding: 10px 20px 20px;
}

.pond-fish-badge {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pond-fish-badge i {
    color: var(--primary);
}

.pond-quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-bottom: 12px;
}

.pond-stat-unit {
    display: flex;
    flex-direction: column;
}

.pond-stat-unit span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.pond-stat-unit strong {
    font-size: 0.85rem;
    color: var(--text-main);
}

.pond-water-bar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.pond-card-footer {
    background-color: rgba(0, 0, 0, 0.15);
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
}

.pond-card-footer .cost {
    font-weight: 700;
    color: var(--primary);
}

/* Water Quality Widget */
.water-quality-widget {
    margin-bottom: 24px;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.widget-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.alert-item.danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-item i {
    font-size: 1.1rem;
    margin-top: 2px;
}

.alert-content {
    display: flex;
    flex-direction: column;
}

.alert-msg {
    font-size: 0.8rem;
    font-weight: 600;
}

.alert-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Quick Calculator Box */
.quick-feed-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
}

.quick-feed-box h3 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.form-group-row {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.form-group-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Forms CSS */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

select.form-control {
    background-color: #0c111e;
}

select.form-control option {
    background-color: #0c111e;
    color: #f8fafc;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
    background-color: rgba(255, 255, 255, 0.04);
}

.form-control[readonly] {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    cursor: not-allowed;
}

.help-text {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0 16px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.divider::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: var(--border-color);
    margin-left: 12px;
}

.form-actions-right {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Quick calculator results */
.quick-calc-result {
    background-color: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
}

/* Feeding Calculator Output view */
.calc-results-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    text-align: center;
}

.calc-results-output {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-large {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.result-large-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.result-large-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
    display: block;
    margin-top: 4px;
}

.metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.metric-box {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-box span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.metric-box strong {
    font-size: 1.05rem;
    margin-top: 4px;
}

.feed-distribution h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
}

.timeline-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.timeline-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.8rem;
}

.action-box {
    margin-top: 10px;
}

/* Modals layout */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    width: 500px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-lg .modal-content {
    width: 96vw;
    height: 90vh;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
}

.modal-lg .modal-body {
    padding: 32px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: none;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* ==========================================
   POND WORKSPACE LAYOUT (NEW MULTI-TAB DIALOG)
   ========================================== */
.pond-workspace-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    height: 100%;
    min-height: 520px;
}

.workspace-sidebar {
    border-right: 1px solid var(--border-color);
    padding-right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workspace-tab-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.workspace-tab-item:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.02);
}

.workspace-tab-item.active {
    color: var(--primary);
    background-color: var(--primary-glow);
    border-color: rgba(6, 182, 212, 0.2);
}

.workspace-tab-item i {
    width: 16px;
    text-align: center;
}

.workspace-tab-content {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

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

.workspace-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.status-indicator-box {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}

.status-badge {
    background-color: var(--primary-glow);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 8px;
}

.detail-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.status-indicator-box h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2px;
}

.info-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.info-list li span {
    color: var(--text-muted);
}

.card-inner {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
}

.card-inner h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.water-status-bar {
    border-radius: 10px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.water-status-bar .ph-val {
    font-size: 1.2rem;
}

.pond-finance-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.finance-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.finance-line span {
    color: var(--text-muted);
}

.finance-line.total-line {
    font-size: 0.9rem;
    font-weight: 700;
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Harvest summary calculation box */
.harvest-calc-summary {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.h-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.h-line span {
    color: var(--text-muted);
}

.h-line.total-clean {
    font-size: 1rem;
    font-weight: 700;
}

/* Backup and Sync styles */
.backup-status-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.backup-status-header {
    display: flex;
    gap: 24px;
    align-items: center;
}

.cloud-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: rgba(16, 185, 129, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.onedrive-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #000;
    border-radius: 50%;
    color: #0078d4;
    padding: 2px;
}

.cloud-status-details h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

.tag-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}

.tag-success {
    background-color: var(--success-glow);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-info {
    background-color: var(--accent-glow);
    color: var(--accent);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.tag-purple {
    background-color: var(--purple-glow);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.backup-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.action-card {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
}

.action-card h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
}

.info-alert {
    background-color: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.15);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: 0.8rem;
}

.info-alert i {
    font-size: 1.2rem;
    color: var(--primary);
    margin-top: 2px;
}

.divider-thin {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 10px 0;
}

.restore-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.restore-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.restore-item:hover {
    border-color: var(--border-hover);
    background-color: rgba(255, 255, 255, 0.04);
}

.restore-item.selected {
    border-color: var(--primary);
    background-color: var(--primary-glow);
}

.restore-meta {
    display: flex;
    flex-direction: column;
}

.restore-filename {
    font-size: 0.8rem;
    font-weight: 600;
}

.restore-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.restore-size {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

/* Simulated Cashflow Chart Bars */
.financial-summary-row {
    display: flex;
    gap: 16px;
    font-size: 0.72rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-item i {
    font-size: 0.8rem;
}

.chart-container {
    height: 200px;
    display: flex;
    align-items: flex-end;
    padding-top: 20px;
}

.simulated-chart {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    height: 100%;
    align-items: flex-end;
    gap: 30px;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
    height: 80%;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 4px;
}

.bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 4px;
}

.bar span {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    writing-mode: vertical-rl;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    margin-top: 2px;
}

.bar-income {
    background: linear-gradient(180deg, var(--success), rgba(16, 185, 129, 0.2));
}

.bar-expense {
    background: linear-gradient(180deg, var(--danger), rgba(239, 68, 68, 0.2));
}

.bar-tarp {
    background: linear-gradient(180deg, var(--purple), rgba(139, 92, 246, 0.2));
}

.chart-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 600;
}

/* Settings Form Grid */
.settings-grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group-inline {
    display: flex;
    align-items: center;
}

.form-control-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* ==========================================
   PORTAL LOGIN & PERMISSIONS STYLING
   ========================================== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 15, 0.88);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.login-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 40px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(6, 182, 212, 0.08);
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: loginEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes loginEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.login-header h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.85rem;
    color: #fff;
    margin-top: 8px;
}

.login-header p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.login-error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-align: center;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.btn-logout:hover {
    color: var(--danger) !important;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
}

/* Glassmorphic Permission Badges (High Contrast) */
.perm-badge {
    background-color: rgba(34, 211, 238, 0.08);
    color: #22d3ee;
    border: 1px solid rgba(34, 211, 238, 0.28);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    margin-right: 4px;
    margin-bottom: 6px;
    display: inline-block;
    letter-spacing: 0.3px;
    text-shadow: 0 0 8px rgba(34, 211, 238, 0.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Floating Alert Banner */
.alert-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95), rgba(185, 28, 28, 0.95));
    border: 1px solid rgba(239, 68, 68, 0.4);
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.35);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 8px 32px rgba(239, 68, 68, 0.25); }
    50% { box-shadow: 0 8px 32px rgba(239, 68, 68, 0.45); }
}

/* KPI Customizations */
.text-gold {
    color: #ffd700 !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.kpi-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
}
