/* Unified Custom CSS Framework - School Management Toolkit */

/* Color Variables */
:root {
    --primary-color: #B8860B;
    --primary-light: rgba(184, 134, 11, 0.1);
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #888;
    --border-color: #ccc;
    --background-light: #fafafa;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
    outline: none;
}

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

.btn-primary:hover {
    background: #996f09;
    color: white;
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.card-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

/* Grid System */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col {
    flex: 1;
    padding: 0 10px;
}

.col-1 { flex: 0 0 8.333%; }
.col-2 { flex: 0 0 16.666%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

select.form-control {
    background: white;
    cursor: pointer;
}

/* Typography */
.text-primary { color: var(--primary-color); }
.text-muted { color: var(--text-light); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-weight-bold { font-weight: 600; }
.font-weight-normal { font-weight: 400; }

/* Spacing */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }

.p-0 { padding: 0; }
.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
.p-5 { padding: 30px; }

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

/* Flex utilities */
.justify-content-start { justify-content: flex-start; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }

.align-items-start { align-items: flex-start; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }

.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

/* Responsive utilities */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .row {
        margin: 0 -5px;
    }
    
    .col {
        padding: 0 5px;
    }
    
    .col-md-6,
    .col-md-4,
    .col-md-3 {
        flex: 0 0 100%;
    }
    
    .d-md-none {
        display: none;
    }
    
    .d-md-block {
        display: block;
    }
}

@media (min-width: 769px) {
    .col-md-1 { flex: 0 0 8.333%; }
    .col-md-2 { flex: 0 0 16.666%; }
    .col-md-3 { flex: 0 0 25%; }
    .col-md-4 { flex: 0 0 33.333%; }
    .col-md-6 { flex: 0 0 50%; }
    .col-md-8 { flex: 0 0 66.666%; }
    .col-md-9 { flex: 0 0 75%; }
    .col-md-12 { flex: 0 0 100%; }
}

/* Loading states */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.loading::after {
    content: "...";
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Alert messages */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d9ff;
}