/* Mobile-First Responsive Design for KBCT Blueprint360 */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Buttons */
.btn-responsive {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 120px;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-responsive:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* Cards */
.card-responsive {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 20px;
    transition: transform 0.2s ease;
}

.card-responsive:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.table-responsive table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-responsive th,
.table-responsive td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table-responsive th {
    background: #343a40;
    color: white;
    font-weight: 600;
}

/* Reports Page Styling */
.reports-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.report-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease;
}

.report-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.report-card h3 {
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.report-card button {
    background-color: #007bff;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    width: 100%;
    max-width: 200px;
}

.report-card button:hover {
    background-color: #0056b3;
}

/* Navigation Styles */
.navbar-responsive {
    background: #343a40;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-responsive .navbar-brand {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.25rem;
}

.navbar-responsive .navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-responsive .nav-link {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-responsive .nav-link:hover {
    color: white;
}

/* Forms */
.form-responsive {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, .25);
}

/* Mobile Responsive Breakpoints */

/* Tablets (768px and down) */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .reports-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .report-card {
        padding: 15px;
    }

    .card-responsive {
        padding: 15px;
        margin-bottom: 15px;
    }

    .btn-responsive {
        width: 100%;
        margin: 5px 0;
        padding: 15px;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 8px 10px;
        font-size: 14px;
    }

    .form-responsive {
        padding: 20px;
    }
}

/* Mobile Phones (480px and down) */
@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .report-card {
        padding: 12px;
    }

    .card-responsive {
        padding: 12px;
        margin-bottom: 12px;
    }

    .btn-responsive {
        padding: 12px;
        font-size: 13px;
    }

    .table-responsive {
        font-size: 12px;
    }

    .table-responsive th,
    .table-responsive td {
        padding: 6px 8px;
    }

    .form-responsive {
        padding: 15px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* Landscape Mobile (576px and down) */
@media (max-width: 576px) and (orientation: landscape) {
    .navbar-responsive {
        padding: 0.5rem 0;
    }

    .reports-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .report-card {
        padding: 10px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .report-card,
    .card-responsive {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    }
}

/* Print Styles */
@media print {

    .navbar-responsive,
    .btn-responsive {
        display: none;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .report-card,
    .card-responsive {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}
