/**
 * CLAWS Main Application CSS
 * Styles for the complete CLAWS application
 */

/* ===========================================
   CSS VARIABLES FOR GRAY COLORS (NON-HEADER)
   =========================================== */
:root {
    --claws-gray-100: #f3f4f6;
    --claws-gray-200: #e5e7eb;
    --claws-gray-300: #d1d5db;
    --claws-gray-500: #6b7280;
    --claws-gray-800: #1f2937;
    --claws-gray-900: #111827;
}

/* ===========================================
   NEONATE CARE STYLES
   =========================================== */
.claws-feeding-table {
    font-size: 0.75rem;
    width: 100%;
}

.claws-feeding-input {
    font-size: 0.75rem;
    padding: 0.25rem;
    border: 1px solid var(--claws-gray-300);
    border-radius: 0.25rem;
}

.claws-care-card {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--claws-gray-200);
    transition: all 0.2s ease-in-out;
    margin-bottom: 1rem;
}

.claws-care-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.claws-schedule-highlight {
    background: linear-gradient(to right, #D6E4F0, #B8D4E8);
    border: 1px solid var(--claws-gray-300);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.claws-timer-active {
    animation: claws-pulse 2s infinite;
}

@keyframes claws-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.claws-feeding-log {
    max-height: 16rem;
    overflow-y: auto;
}

.claws-feeding-log::-webkit-scrollbar {
    width: 4px;
}

.claws-feeding-log::-webkit-scrollbar-track {
    background: var(--claws-gray-100);
}

.claws-feeding-log::-webkit-scrollbar-thumb {
    background: var(--claws-gray-300);
    border-radius: 2px;
}

/* ===========================================
   ADMIN STYLES
   =========================================== */
.claws-admin-section {
    background: white;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.claws-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.claws-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--claws-gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.claws-stat-card .stat-icon {
    font-size: 2rem;
}

.claws-stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--claws-gray-800);
    margin: 0;
}

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

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

.instruction-card {
    background: var(--claws-gray-50);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--claws-gray-200);
}

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

.report-stat {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.report-stat h3 {
    font-size: 2rem;
    color: var(--claws-gray-800);
    margin: 0;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.health-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.health-good { background: #dcfce7; color: #166534; }
.health-warning { background: #fef3c7; color: #92400e; }
.health-poor { background: #fed7aa; color: #9a3412; }
.health-critical { background: #fecaca; color: #991b1b; }

.claws-recent-activity {
    margin-top: 1rem;
}

.claws-help-section {
    background: white;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.help-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--claws-gray-200);
}

.help-item:last-child {
    border-bottom: none;
}

.help-item h4 {
    color: var(--claws-gray-800);
    margin: 0 0 0.5rem;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 640px) {
    .claws-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .claws-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .claws-instructions {
        grid-template-columns: 1fr;
    }
    
    .claws-modal {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem);
    }
    
    .claws-alert {
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
}

/* ===========================================
   STANDALONE MODULE STYLES
   =========================================== */
.claws-standalone-module {
    max-width: 28rem;
    margin: 0 auto;
    background: var(--claws-gray-50);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   RESPONSIVE DESIGN FOR MAIN APP
   =========================================== */
.claws-responsive-container {
    width: 100%;
    max-width: 480px; /* Mobile/tablet default */
}

/* Tablet landscape and small desktop */
@media (min-width: 768px) {
    .claws-responsive-container {
        max-width: 720px;
    }
    
    .claws-standalone-module {
        max-width: 720px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .claws-responsive-container {
        max-width: 900px;
    }
    
    .claws-standalone-module {
        max-width: 900px;
    }
}

/* Large desktop */
@media (min-width: 1280px) {
    .claws-responsive-container {
        max-width: 1100px;
    }
    
    .claws-standalone-module {
        max-width: 1100px;
    }
}

/* Extra large desktop */
@media (min-width: 1536px) {
    .claws-responsive-container {
        max-width: 1300px;
    }
    
    .claws-standalone-module {
        max-width: 1300px;
    }
}

.loading-message {
    padding: 2rem;
    text-align: center;
    color: #ffffff;
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.claws-text-center { text-align: center; }
.claws-text-left { text-align: left; }
.claws-text-right { text-align: right; }

.claws-font-bold { font-weight: bold; }
.claws-font-medium { font-weight: 500; }

.claws-text-sm { font-size: 0.875rem; }
.claws-text-xs { font-size: 0.75rem; }
.claws-text-lg { font-size: 1.125rem; }
.claws-text-xl { font-size: 1.25rem; }

.claws-mt-2 { margin-top: 0.5rem; }
.claws-mt-4 { margin-top: 1rem; }
.claws-mb-2 { margin-bottom: 0.5rem; }
.claws-mb-4 { margin-bottom: 1rem; }

.claws-p-2 { padding: 0.5rem; }
.claws-p-4 { padding: 1rem; }
.claws-px-4 { padding-left: 1rem; padding-right: 1rem; }
.claws-py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }

.claws-rounded { border-radius: 0.25rem; }
.claws-rounded-lg { border-radius: 0.5rem; }
.claws-rounded-xl { border-radius: 0.75rem; }

.claws-shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.claws-shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }

.claws-border { border: 1px solid var(--claws-gray-200); }
.claws-border-t { border-top: 1px solid var(--claws-gray-200); }
.claws-border-b { border-bottom: 1px solid var(--claws-gray-200); }

/* ===========================================
   DARK MODE SUPPORT (FUTURE)
   =========================================== */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles will be added in future versions */
}GLOBAL CLAWS STYLES
   =========================================== */
.claws-app-wrapper {
    font-family: system-ui, -apple-system, -webkit-system-font, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    color: #ffffff;
}

/* Additional Gray Colors */
:root {
    --claws-gray-50: #f9fafb;
}

/* Button Hover States */
button[id^="claws-tab-"] {
    transition: all 0.2s ease-in-out;
}

button[id^="claws-tab-"]:hover:not(.claws-tab-active) {
    background-color: var(--claws-gray-100);
}

/* ===========================================
   CONTENT SECTIONS
   =========================================== */
.claws-content-section {
    min-height: 400px;
    transition: opacity 0.3s ease-in-out;
}

.claws-section-hidden {
    display: none !important;
}

/* ===========================================
   DEMO MODE STYLES
   =========================================== */
.claws-demo-mode {
    background: #FFA500;
    color: white;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.875rem;
    border-radius: 0 0 1rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Login prompt styles now handled by master header inheritance */

/* ===========================================
   COLONY TRACKER STYLES
   =========================================== */
.claws-map-container {
    height: 320px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.claws-colony-card {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.claws-colony-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.claws-stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--claws-gray-200);
    transition: all 0.2s ease-in-out;
}

.claws-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ===========================================
   PROGRESS BARS
   =========================================== */
.claws-progress-bar {
    transition: width 0.3s ease-in-out;
    border-radius: 9999px;
}

.claws-progress-good { background-color: #10b981; }
.claws-progress-warning { background-color: #f59e0b; }
.claws-progress-poor { background-color: #f97316; }
.claws-progress-critical { background-color: #ef4444; }

/* ===========================================
   HEALTH INDICATORS
   =========================================== */
.claws-health-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.claws-health-good {
    background-color: #dcfce7;
    color: #166534;
}

.claws-health-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.claws-health-poor {
    background-color: #fed7aa;
    color: #9a3412;
}

.claws-health-critical {
    background-color: #fecaca;
    color: #991b1b;
}

/* ===========================================
   BUTTON STYLES - Now using master header inheritance
   =========================================== */
.claws-btn {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    font-size: 0.875rem;
}

.claws-btn-secondary {
    background: linear-gradient(to bottom, #e5e7eb, #d1d5db);
    color: var(--claws-gray-800);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.claws-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
}

.claws-btn-primary {
    background: var(--claws-primary-button-color) !important;
    color: var(--claws-button-text-color) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.claws-btn-primary:hover {
    background: var(--claws-primary-button-color) !important;
    color: var(--claws-button-text-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15), 0 4px 6px -1px rgba(0, 0, 0, 0.1), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

/* ===========================================
   MODAL STYLES
   =========================================== */
.claws-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.claws-modal {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 28rem;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.claws-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--claws-gray-200);
}

.claws-modal-content {
    padding: 1rem;
}

.claws-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.claws-modal-close:hover {
    background-color: var(--claws-gray-100);
}

/* ===========================================
   FORM STYLES
   =========================================== */
.claws-form-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--claws-gray-200);
    margin-bottom: 1rem;
}

.claws-form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.claws-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--claws-gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.claws-form-input:focus {
    outline: none;
    border-color: var(--claws-master-bg-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.claws-form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--claws-gray-300);
    border-radius: 0.5rem;
    background: white;
    box-sizing: border-box;
    font-size: 1rem;
    cursor: pointer;
}

.claws-form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--claws-gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    box-sizing: border-box;
    resize: vertical;
    min-height: 3rem;
}

/* ===========================================
   LOADING STYLES
   =========================================== */
.claws-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.claws-loading-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.claws-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--claws-gray-200);
    border-top: 3px solid var(--claws-master-bg-primary, #2563eb);
    border-radius: 50%;
    animation: claws-spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes claws-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   ALERT STYLES
   =========================================== */
.claws-alert {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    color: white;
    z-index: 9999;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    font-size: 0.875rem;
    animation: claws-slide-in 0.3s ease-out;
}

.claws-alert-success { background-color: #10b981; }
.claws-alert-error { background-color: #ef4444; }
.claws-alert-warning { background-color: #f59e0b; }
.claws-alert-info { background-color: #3b82f6; }

@keyframes claws-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===========================================
   PIE CHART STYLES
   =========================================== */
.claws-chart-container {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--claws-gray-200);
    margin: 1rem;
}

.claws-chart-legend {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.claws-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.claws-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 0.5rem;
}

/* ===========================================
   INTAKE/DISCHARGE STYLES - Now using master header inheritance
   =========================================== */

.claws-tab-selector {
    background: white;
    border-bottom: 1px solid var(--claws-gray-200);
    margin: 1rem 1rem 0;
    border-radius: 1rem 1rem 0 0;
}

.claws-tab-selector button {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.claws-tab-selector button:first-child {
    border-radius: 1rem 0 0 0;
}

.claws-tab-selector button:last-child {
    border-radius: 0 1rem 0 0;
}

.claws-tab-selector button.active {
    color: white;
}

/* ===========================================
   ANIMATIONS FOR ENHANCEMENTS
   =========================================== */

/* Pulse animation for upgrade prompt icon */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide down animation for banners */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.claws-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.claws-slide-down {
    animation: slideDown 0.3s ease-out;
}

/* Hover effect for upgrade cards */
.claws-upgrade-feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.claws-upgrade-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ===========================================
   