/* e-Shikshakosh DCF stylesheet - Unified style matching page1 & page2 templates */

:root {
    --primary-color: #000000;
    --primary-hover: #333333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --text-color: #000000;
    --text-muted: #666666;
    --border-color: #000000;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: var(--bg-color);
    padding: 20px;
    color: var(--text-color);
    line-height: 1.4;
}

/* Page container matching the templates exactly */
.page {
    width: 900px;
    margin: 40px auto;
    background: #fff;
    border: 2px solid #000;
    padding: 25px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

h1 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 20px;
    font-weight: bold;
}

.section-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    text-decoration: underline;
    margin: 20px 0;
}

/* Row elements */
.row {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.sr {
    width: 40px;
    font-weight: bold;
    font-size: 14px;
}

.label {
    width: 320px;
    font-size: 14px;
}

.colon {
    width: 20px;
    font-size: 14px;
    text-align: center;
}

.input-area {
    flex: 1;
}

.input-area input,
.input-area select {
    width: 100%;
    border: none;
    border-bottom: 1px solid #000;
    padding: 5px;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-weight: bold; /* Bold data as requested */
}

/* Date groups */
.date-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.date-group input {
    width: 70px;
    text-align: center;
    border: none;
    border-bottom: 1px solid #000;
}

.btn-area {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s ease;
}

button:hover, .btn:hover {
    background: #333;
}

.btn-secondary {
    background: #cccccc;
    color: #000;
}
.btn-secondary:hover {
    background: #b3b3b3;
}

/* Footer info */
.print-footer {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    margin-top: 35px;
}

/* Dashboard List Styling */
.container {
    max-width: 950px;
    margin: 20px auto;
}

.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border: 2px solid #000;
    margin-bottom: 25px;
}

.table-card {
    background: #fff;
    border: 2px solid #000;
    margin-bottom: 30px;
    overflow: hidden;
}

.search-bar {
    padding: 15px 25px;
    border-bottom: 2px solid #000;
    display: flex;
    gap: 15px;
    background: #fafafa;
}

.search-bar input {
    flex-grow: 1;
    border: 1px solid #000;
    padding: 8px 12px;
    outline: none;
}

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    background: #fafafa;
    padding: 12px 20px;
    border-bottom: 2px solid #000;
    font-weight: bold;
    text-align: left;
}

.table td {
    padding: 12px 20px;
    border-bottom: 1px solid #ccc;
}

.table tr:hover td {
    background: #f9f9f9;
}

.alert-banner {
    background-color: #fef08a;
    border: 2px solid #ca8a04;
    color: #854d0e;
    padding: 15px 25px;
    margin-bottom: 25px;
    font-weight: bold;
    text-align: center;
}

.print-actions {
    background: #fff;
    padding: 15px 25px;
    border: 2px solid #000;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Print Styles */
@media print {
    body {
        background: #fff;
        padding: 0;
        margin: 0;
    }
    
    .container, .print-actions, .actions-bar, .table-card, .btn, .btn-area, .alert-banner {
        display: none !important;
    }
    
    .page {
        border: 2px solid #000 !important; /* Retain outer A4 border */
        box-shadow: none !important;
        margin: 0 auto !important;
        padding: 8mm 12mm !important; /* Reduced vertical padding to fit A4 */
        width: 100% !important;
        max-width: 100% !important;
        height: 297mm !important; /* Fixed A4 height to prevent spill over */
        page-break-after: always;
        box-sizing: border-box;
        position: relative;
        overflow: hidden;
    }
    
    .page:last-child {
        page-break-after: avoid;
    }
    
    h1 {
        margin-bottom: 8px !important;
        font-size: 18px !important;
    }
    
    .section-title {
        margin: 8px 0 !important;
        font-size: 16px !important;
    }
    
    .row {
        margin: 4px 0 !important; /* Compact spacing between rows */
    }
    
    .row, .sr, .label, .colon, .input-area, .input-area div {
        font-size: 11px !important; /* Smaller text for print */
    }
    
    .print-footer {
        margin-top: 15px !important;
    }
    
    .input-area select {
        appearance: none;
        border: none !important;
        border-bottom: 1px solid #000 !important;
    }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .page {
        width: 100%;
        margin: 10px auto;
        padding: 15px;
        border: 1px solid #000;
    }
    .row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 15px;
    }
    .sr {
        display: inline-block;
        width: auto;
        margin-right: 5px;
    }
    .label {
        width: 100%;
        margin-bottom: 5px;
        display: inline-block;
    }
    .colon {
        display: none;
    }
    .input-area {
        width: 100%;
    }
    .date-group {
        flex-wrap: wrap;
    }
    .date-group input {
        width: 30%;
        min-width: 60px;
    }
    .actions-bar, .search-bar {
        flex-direction: column;
        gap: 10px;
    }
    .btn-area {
        flex-direction: column;
        gap: 10px;
    }
    .btn-area button, .btn-area a {
        width: 100%;
    }
}

