/* Modern Flat Design CSS for Onstage Media Australia */
/* Color Palette: #2563eb (Primary Blue), #64748b (Grey), #f8fafc (Light Grey), #0f172a (Dark) */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #0f172a;
    background-color: #f8fafc;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.logo h1 {
    color: #0f172a;
    font-size: 20px;
    font-weight: 600;
}

.logo h1 a {
    color: inherit;
    text-decoration: none;
}

.logo .subtitle {
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
    margin-top: -2px;
}

nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a {
    color: #64748b;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

nav a:hover {
    background-color: #f1f5f9;
    color: #2563eb;
}

nav a.active {
    background-color: #2563eb;
    color: white;
}

/* Main Content */
main {
    padding: 32px 0;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 48px 0;
    margin-bottom: 48px;
}

.hero h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    color: #0f172a;
    font-weight: 600;
    margin-bottom: 16px;
}

h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

h2 {
    font-size: 24px;
    margin-bottom: 24px;
}

h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

h4 {
    font-size: 18px;
    margin-bottom: 12px;
}

p {
    margin-bottom: 16px;
    color: #475569;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.card h3 {
    color: #0f172a;
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn {
    background: #2563eb;
    color: white;
}

.btn:hover {
    background: #1d4ed8;
    color: white;
}

.btn-secondary {
    background: #64748b;
    color: white;
}

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

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

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: all 0.2s ease;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #cbd5e1;
}

/* Custom Select Dropdown */
.form-group select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select:focus {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%232563eb" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
}

/* Custom Checkbox */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.2);
    accent-color: #2563eb;
}

/* Custom File Input */
.form-group input[type="file"] {
    padding: 8px 12px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-grid .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-grid .form-group {
        margin-bottom: 24px;
    }
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

thead {
    background: #f8fafc;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    color: #475569;
    font-size: 14px;
}

tr:hover {
    background: #f8fafc;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Status indicators */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    gap: 4px;
}

.status-success {
    background: #ecfdf5;
    color: #065f46;
}

.status-error {
    background: #fef2f2;
    color: #991b1b;
}

.status-warning {
    background: #fffbeb;
    color: #92400e;
}

/* Footer */
footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 24px 0;
    margin-top: auto;
    font-size: 14px;
}

footer a {
    color: #2563eb;
    text-decoration: none;
}

footer a:hover {
    color: #3b82f6;
}

/* Progress bars */
.progress {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    header .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .card {
        padding: 16px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    main {
        padding: 16px 0;
    }
    
    .card {
        padding: 12px;
        margin-bottom: 16px;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Charts and Gauges */
.stat-card {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    text-align: center;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 12px;
    opacity: 0.8;
}

.stat-card.warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.stat-card.danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.stat-card.success {
    background: linear-gradient(135deg, #059669, #10b981);
}

/* Circular Progress Gauge */
.gauge-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.gauge {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #2563eb 0deg, #e2e8f0 0deg);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
}

.gauge-text {
    position: absolute;
    z-index: 10;
    font-size: 18px;
    font-weight: bold;
    color: #0f172a;
}

.gauge-label {
    text-align: center;
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 200px;
    margin: 16px 0;
}

.bar-chart {
    display: flex;
    align-items: end;
    height: 150px;
    gap: 8px;
    padding: 0 8px;
    margin-bottom: 16px;
}

.bar {
    background: linear-gradient(to top, #2563eb, #3b82f6);
    border-radius: 4px 4px 0 0;
    min-width: 24px;
    position: relative;
    transition: all 0.3s ease;
}

.bar:hover {
    background: linear-gradient(to top, #1d4ed8, #2563eb);
    transform: scale(1.05);
}

.bar-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
}

.bar-value {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #0f172a;
    font-weight: 500;
    white-space: nowrap;
}

/* Donut Chart */
.donut-chart {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.donut-segment {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    clip: rect(0, 150px, 150px, 75px);
}

.donut-segment::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    clip: rect(0, 75px, 150px, 0);
    background: #2563eb;
    transform-origin: 75px 75px;
}

.donut-center {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Status indicators enhanced */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-online .status-dot {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-warning .status-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.status-error .status-dot {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Grid layouts for dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .stat-card .stat-number {
        font-size: 24px;
    }
}

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

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

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.count-up {
    animation: countUp 0.6s ease-out;
}