/* MJFSC Admin Panel - Modern Reskin */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    height: 100%;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    background: #f4f6f9;
    font-size: 14px;
    color: #343a40;
}
a { color: #0984e3; text-decoration: none; transition: 0.3s; }
a:hover { color: #076aba; text-decoration: none; }
.clear { clear: both; height: 1px; }
.spacer { height: 20px; }

/* Header */
header#header {
    height: 60px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}
header#header h1.site_title { font-size: 20px; font-weight: 600; margin: 0; width: 230px;}
header#header h1.site_title a { color: #2c3e50; }
header#header h2.section_title {
    font-size: 16px;
    color: #7f8c8d;
    font-weight: 500;
    flex-grow: 1;
    text-align: left;
    padding-left: 20px;
}
.btn_view_site a {
    background: #0984e3;
    color: #fff;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn_view_site a:hover { background: #076aba; }

/* Secondary Header Bar */
section#secondary_bar {
    height: 45px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    padding: 0 20px;
}
.user { width: 230px; font-weight: 500; color: #2c3e50; font-size: 13px; }
.user p { margin: 0; display: flex; align-items: center; gap: 8px; }
.breadcrumbs_container {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #7f8c8d; }
.breadcrumbs a { color: #34495e; font-weight: 500; }
.breadcrumb_divider::after { content: "/"; margin: 0 5px; color: #bdc3c7;}
.logout-box a.button {
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
}
.logout-box a.button:hover { background: #c0392b; }

/* Main Layout */
#main_wrapper { display: flex; min-height: calc(100vh - 150px); width: 100%; }

/* Sidebar */
#sidebar {
    width: 250px;
    background: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    flex-shrink: 0;
}
.sidebar-search { padding: 0 20px 20px; }
.sidebar-search input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 20px;
    border: none;
    background: #34495e;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}
.sidebar-search input:focus { outline: none; background: #3b536b; }
#sidebar h3 {
    padding: 10px 20px;
    font-size: 12px;
    text-transform: uppercase;
    color: #bdc3c7;
    letter-spacing: 1px;
    margin-top: 10px;
}
#sidebar ul { list-style: none; padding: 0; margin: 0; }
#sidebar li { margin: 0; }
#sidebar li a {
    display: block;
    padding: 12px 20px 12px 45px;
    color: #ecf0f1;
    font-size: 14px;
    position: relative;
    border-left: 3px solid transparent;
}
#sidebar li a:hover {
    background: #34495e;
    border-left-color: #3498db;
    color: #fff;
}

/* Legacy Sidebar Icons Mapping to FontAwesome */
#sidebar li.icn_new_article a::before, #sidebar li.icn_edit_article a::before { content: "\f044"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 20px; color: #3498db; }
#sidebar li.icn_categories a::before { content: "\f07b"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 20px; color: #f1c40f; }
#sidebar li.icn_tags a::before { content: "\f02b"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 20px; color: #e74c3c; }
#sidebar li.icn_view_users a::before, #sidebar li.icn_add_user a::before { content: "\f0c0"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 20px; color: #2ecc71; }
#sidebar li.icn_profile a::before { content: "\f007"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 20px; color: #9b59b6; }
#sidebar li.icn_settings a::before { content: "\f013"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 20px; color: #e67e22; }

#sidebar footer {
    padding: 20px;
    margin-top: 30px;
    border-top: 1px solid #34495e;
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
}
#sidebar footer a { color: #3498db; }

/* Main Content Area */
#main {
    flex-grow: 1;
    padding: 25px;
    overflow-x: hidden;
    width: calc(100% - 250px);
}
#main h3 { font-size: 16px; margin-bottom: 15px; color: #2c3e50; }

/* Modules (Cards) */
.module {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}
.module header {
    background: #fdfdfd;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.module header h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}
.module_content {
    padding: 20px;
    color: #495057;
}

/* Width Helpers */
.width_full { width: 100%; }
.width_half { width: 48%; float: left; margin-right: 2%; }
.width_quarter { width: 23%; float: left; margin-right: 2%; }
.width_3_quarter { width: 73%; float: left; margin-right: 2%; }
.width_half:last-child, .width_quarter:last-child, .width_3_quarter:last-child { margin-right: 0; }

/* Dashboard Summary Cards */
.stats_graph { width: 100%; margin-bottom: 20px; }
.stats_overview { 
    background: #fff; 
    border: 1px solid #e9ecef; 
    border-radius: 8px; 
    padding: 20px; 
    display: flex; 
    justify-content: space-around; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.overview_today, .overview_previous { text-align: center; }
.overview_day { font-size: 13px; font-weight: 600; color: #7f8c8d; margin-bottom: 5px; text-transform: uppercase; }
.overview_count { font-size: 32px; font-weight: bold; color: #0984e3; line-height: 1; margin-bottom: 5px;}
.overview_type { font-size: 12px; color: #95a5a6; text-transform: uppercase; }

/* Forms */
fieldset { border: none; margin-bottom: 20px; }
fieldset label { display: block; font-weight: 500; margin-bottom: 8px; color: #34495e; }
input[type=text], input[type=password], select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #f8f9fa;
    font-family: inherit;
    color: #495057;
    transition: 0.3s;
}
input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus {
    border-color: #80bdff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(9, 132, 227, 0.15);
    background: #fff;
}
textarea { resize: vertical; min-height: 100px; }

/* Buttons */
input[type=submit], .btn, .button, button {
    background: linear-gradient(135deg, #0984e3, #6c5ce7);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
    display: inline-block;
}
input[type=submit]:hover, .btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

/* Tables */
table.tablesorter, .table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}
.tablesorter th, .table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    color: #2c3e50;
}
.tablesorter td, .table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}
.tablesorter tr:hover td { background: #f1f3f5; }

/* Messages */
h4.alert_info { background: #d9edf7; border-left: 4px solid #31708f; color: #31708f; padding: 15px; border-radius: 4px; margin-bottom: 20px; font-weight: normal; }
h4.alert_warning { background: #fcf8e3; border-left: 4px solid #8a6d3b; color: #8a6d3b; padding: 15px; border-radius: 4px; margin-bottom: 20px; font-weight: normal; }
h4.alert_error { background: #f2dede; border-left: 4px solid #a94442; color: #a94442; padding: 15px; border-radius: 4px; margin-bottom: 20px; font-weight: normal; }
h4.alert_success { background: #dff0d8; border-left: 4px solid #3c763d; color: #3c763d; padding: 15px; border-radius: 4px; margin-bottom: 20px; font-weight: normal; }

/* Tabs */
ul.tabs {
    list-style: none;
    display: flex;
    margin-top: -15px;
    margin-right: -20px;
    margin-bottom: 0;
}
ul.tabs li {
    padding: 15px 25px;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #7f8c8d;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}
ul.tabs li.active { color: #0984e3; border-bottom: 2px solid #0984e3; }
ul.tabs li a { color: inherit; text-decoration: none; }

/* Footer */
#footer {
    text-align: center;
    padding: 20px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 13px;
    width: 100%;
}

/* =========================================
   FORM & TABLE MODERNIZATION OVERRIDES
   ========================================= */

/* Forms (.inputform) */
.inputform {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    padding: 30px;
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
}
.inputform fieldset {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 25px 20px;
    margin-bottom: 25px;
    background: #fdfdfd;
    position: relative;
}
.inputform legend {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: #2c3e50;
    padding: 6px 15px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.inputform p {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.inputform label {
    display: inline-block;
    width: 200px;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}
.inputform input.field, .inputform textarea.field, .inputform select.field,
.inputform input[type="text"], .inputform input[type="password"], .inputform select {
    flex-grow: 1;
    width: calc(100% - 220px);
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.inputform input.field:focus, .inputform textarea.field:focus, .inputform select.field:focus {
    border-color: #0984e3;
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.15);
    outline: none;
}
.inputform textarea.field {
    min-height: 120px;
    resize: vertical;
}
.inputform input[type="file"] {
    flex-grow: 1;
    padding: 8px 0;
}

/* Tables */
.tab_container {
    padding: 20px;
}
table.tablesorter, .table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.tablesorter thead th, .table thead th {
    background: #f8f9fa;
    padding: 16px 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.tablesorter tbody td, .table tbody td {
    padding: 14px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    color: #495057;
    font-size: 14px;
}
.tablesorter tbody tr:last-child td, .table tbody tr:last-child td {
    border-bottom: none;
}
.tablesorter tbody tr:nth-child(even), .table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}
.tablesorter tbody tr:hover, .table tbody tr:hover {
    background-color: #f1f3f5;
    transition: background-color 0.2s ease;
}
/* Table Action Icons */
.tablesorter td a img, .table td a img {
    opacity: 0.7;
    transition: 0.3s;
    margin-right: 5px;
}
.tablesorter td a:hover img, .table td a:hover img {
    opacity: 1;
    transform: scale(1.1);
}

