:root {
    --sidebar-width: 300px;
    --navbar-height: 60px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding-top: 0;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar .logo {
    padding: 10px 20px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar .logo .sidebar-logo {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    margin-bottom: 10px;
}

.sidebar .logo small {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
    margin-top: 5px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #3498db;
}

.sidebar-menu i {
    width: 20px;
    margin-right: 10px;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--navbar-height);
    min-height: 100vh;
}

.navbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--navbar-height);
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.content-wrapper {
    padding: 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

.btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: 500;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.login-header .login-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.login-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

.login-body {
    padding: 40px 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    border-radius: var(--bs-border-radius, 0.375rem);
    border: 1px solid #ddd;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    height: calc(1.5em + 0.75rem + 2px);
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: transform 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* DataTables Pagination Styles */
.dataTables_wrapper .dataTables_paginate {
    margin-top: 1rem;
    text-align: right;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin-left: 0.25rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #fff;
    color: #0d6efd;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
    display: inline-block;
    text-decoration: none;
    transition: all 0.2s;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #0a58ca;
    text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #ddd;
    margin-left: 0.5rem;
}

/* Hide Laravel pagination if DataTables is used */
.dataTables_wrapper ~ .pagination,
.dataTables_wrapper ~ .mt-3 .pagination {
    display: none !important;
}

/* Fixed first column for flow sheet tables */
.flow-sheet-module-table thead th:first-child,
.flow-sheet-module-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #f8f9fa;
    border-right: 2px solid #dee2e6;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
}

.flow-sheet-module-table tbody td:first-child {
    background-color: white;
}

.flow-sheet-module-table thead th:first-child {
    z-index: 11;
    background-color: #f8f9fa !important;
}

/* Ensure table container allows scrolling */
.flow-sheet-module-table {
    position: relative;
}

