/* Custom CSS for Visionary Chama */

/* Enhanced form styling */
.frappe-control[data-fieldtype="Currency"] input,
.frappe-control[data-fieldtype="Data"] input,
.frappe-control[data-fieldtype="Date"] input {
    border-radius: 6px;
    border: 1.5px solid #e2e8f0;
    transition: all 0.2s;
}

.frappe-control[data-fieldtype="Currency"] input:focus,
.frappe-control[data-fieldtype="Data"] input:focus,
.frappe-control[data-fieldtype="Date"] input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Status badges enhancement */
.indicator {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.indicator-green {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.indicator-orange {
    background: #fed7aa !important;
    color: #92400e !important;
}

.indicator-red {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.indicator-blue {
    background: #dbeafe !important;
    color: #1e40af !important;
}

/* Dashboard improvements */
.widget-group {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.widget-group:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* List view enhancements */
.list-row {
    border-radius: 8px;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.list-row:hover {
    background: #f8fafc !important;
}

/* Button improvements */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 20px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3) !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    border-radius: 8px !important;
}

/* Form section headers */
.form-section .section-head {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    padding: 12px 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

/* Custom card styles */
.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* Responsive grid */
@media (max-width: 768px) {
    .dashboard-section {
        padding: 15px;
    }
    
    .widget-group {
        padding: 15px;
    }
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert improvements */
.alert {
    border-radius: 8px;
    border-left-width: 4px;
}

.alert-success {
    background: #d1fae5;
    border-left-color: #10b981;
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border-left-color: #f59e0b;
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

/* Modal improvements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0;
    padding: 20px 24px;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    padding: 16px 24px;
}

/* Table improvements */
.table > tbody > tr > td {
    padding: 12px;
    vertical-align: middle;
}

.table > thead > tr > th {
    background: #f8fafc;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 12px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar improvements */
.desk-sidebar {
    background: white;
    border-right: 1px solid #e2e8f0;
}

.desk-sidebar .standard-sidebar-item {
    border-radius: 8px;
    margin: 4px 8px;
    transition: background 0.2s;
}

.desk-sidebar .standard-sidebar-item:hover {
    background: #f1f5f9;
}

.desk-sidebar .standard-sidebar-item.selected {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

/* Workspace improvements */
.workspace-page {
    background: #f8fafc;
}

.codex-editor {
    background: white;
    border-radius: 12px;
    padding: 24px;
}

/* Form timeline */
.comment-box {
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
}

.comment-box:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Print view */
@media print {
    body {
        background: white;
    }
    
    .no-print {
        display: none !important;
    }
}
