/* ============================================
   ProductionFlow CRM - Professional Styling
   ============================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #4CAF50;
    --warning-color: #FF9800;
    --danger-color: #f44336;
    --info-color: #2196F3;
    --light-bg: #f5f7fa;
    --dark-text: #2c3e50;
    --light-text: #7f8c8d;
    --border-color: #e1e8ed;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
}

/* Container Layout */
.container {
    display: flex;
    height: 100vh;
}

/* ============================================
   SIDEBAR STYLING
   ============================================ */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.sidebar-header .subtitle {
    font-size: 12px;
    opacity: 0.9;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    margin: 5px 0;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-left-color: white;
}

.nav-link .icon {
    font-size: 20px;
    margin-right: 15px;
    display: inline-block;
    width: 24px;
    text-align: center;
}

.nav-link .label {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   DROPDOWN NAVIGATION STYLING
   ============================================ */
.nav-group {
    margin: 5px 0;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    border-left: 4px solid transparent;
    margin: 0;
}

.nav-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-dropdown-toggle .icon {
    font-size: 20px;
    margin-right: 15px;
    display: inline-block;
    width: 24px;
    text-align: center;
}

.nav-dropdown-toggle .label {
    flex: 1;
}

.nav-dropdown-toggle .arrow {
    display: inline-block;
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.nav-dropdown-menu {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-dropdown-menu.show {
    max-height: 500px;
}

.nav-dropdown-link {
    display: flex;
    align-items: center;
    padding: 12px 40px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-size: 13px;
}

.nav-dropdown-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.nav-dropdown-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
}

.nav-dropdown-link .icon-small {
    margin-right: 12px;
    font-size: 16px;
    display: inline-block;
    width: 18px;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.top-bar {
    background: white;
    padding: 20px 40px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
}

.top-bar h2 {
    font-size: 24px;
    color: var(--dark-text);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    padding: 8px 16px;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 14px;
    color: var(--light-text);
}

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px 40px;
}

/* ============================================
   DASHBOARD STYLING
   ============================================ */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.kpi-icon {
    font-size: 40px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 12px;
}

.kpi-content h3 {
    font-size: 14px;
    color: var(--light-text);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 5px 0;
}

.kpi-content small {
    font-size: 12px;
    color: var(--light-text);
}

/* Alerts */
.alerts-section {
    margin-bottom: 30px;
    display: grid;
    gap: 15px;
}

.alert {
    padding: 16px 20px;
    border-radius: 8px;
    border-left: 4px solid;
    background: white;
    box-shadow: var(--shadow);
}

.alert strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.alert p {
    font-size: 13px;
    color: var(--light-text);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background: linear-gradient(to right, rgba(255, 152, 0, 0.05), transparent);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background: linear-gradient(to right, rgba(244, 67, 54, 0.05), transparent);
}

.alert-info {
    border-left-color: var(--info-color);
    background: linear-gradient(to right, rgba(33, 150, 243, 0.05), transparent);
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.header-title h1 {
    margin: 0;
    color: #333;
    font-size: 26px;
    font-weight: 700;
}

.header-title p {
    margin: 0.25rem 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.card-content {
    flex: 1;
}

.card-label {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.card-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.card-subtext {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: #637381;
    line-height: 1.3;
}

.filters-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.text-success {
    color: #28a745;
}

.text-warning {
    color: #ffc107;
}

.text-primary {
    color: #007bff;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

.badge-secondary {
    background: rgba(226, 227, 229, 0.7);
    color: #383d41;
}

.card-header {
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-text);
}

.btn-link {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: var(--secondary-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.data-table th {
    padding: 5px 8px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    line-height: 1;
    height: 24px;
}

.data-table td {
    padding: 4px 8px;
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--dark-text);
    vertical-align: middle;
    line-height: 1;
    height: 24px;
}

.data-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transition: background 0.3s ease;
}

.data-table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.data-table a:hover {
    text-decoration: underline;
}

.data-table th:first-child,
.data-table td:first-child {
    padding-left: 20px;
}

.data-table th:last-child,
.data-table td:last-child {
    padding-right: 20px;
}

.status-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-left: 8px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.16);
    color: var(--primary-color);
    font-size: 13px;
    cursor: help;
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    max-width: 260px;
    min-width: 220px;
    background: white;
    color: var(--dark-text);
    text-align: left;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.6;
    position: fixed;
    z-index: 100;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-transform: none;
    white-space: normal;
    letter-spacing: normal;
    pointer-events: none;
}

.info-tooltip:hover .tooltip-text,
.info-tooltip:focus-within .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.empty-state {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--light-text);
}

.empty-state p {
    margin-bottom: 15px;
}

.danger-row {
    background: linear-gradient(to right, rgba(244, 67, 54, 0.05), transparent);
}

/* ============================================
   FORM STYLING
   ============================================ */
.page-container {
    max-width: 1000px;
    margin: 0 auto;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Card */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card {
    color: var(--dark-text);
}

/* Form Container */
.form-container {
    max-width: 900px;
    margin: 0 auto 30px;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.form-header h1 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.form-header p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.data-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 1.5rem;
    background: #fafafa;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section legend {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 20px;
    display: block;
}

.form-section h3 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea,
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Checkboxes */
.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary,
.empty-state a.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover,
.empty-state a.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
    color: white !important;
}

.btn-secondary {
    background: white;
    color: var(--dark-text);
    border: 2px solid var(--border-color);
}

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

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

.btn-danger:hover {
    background: #d32f2f;
}

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

.btn-ghost:hover {
    background: var(--light-bg);
}

.event-date-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.date-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.date-input-group input[type="date"] {
    flex: 1;
    min-width: 0;
}

.date-input-group .remove-date-btn {
    min-width: auto;
}

.small-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    min-height: 44px;
    line-height: 1.2;
    margin-top: 1.5rem;
    border-radius: 0.75rem;
}

.small-action-button:not(:first-child) {
    margin-left: 0;
}

.btn-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: none;
    color: #333;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-icon.btn-danger:hover {
    background: var(--danger-color);
    color: white;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ============================================
   DETAIL PAGE STYLING
   ============================================ */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    gap: 20px;
    flex-wrap: wrap;
}

.detail-header h2 {
    font-size: 28px;
    color: var(--dark-text);
}

.breadcrumb {
    font-size: 13px;
    color: var(--light-text);
    margin-top: 5px;
}

.detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Progress Section */
.progress-section {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.progress-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.progress-bar,
.progress-bar-large {
    width: 100%;
    height: 20px;
    background: var(--light-bg);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-large {
    height: 30px;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    transition: width 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.progress-text {
    font-size: 13px;
    color: var(--light-text);
    margin-top: 5px;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.detail-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.detail-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-text);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--light-text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: var(--dark-text);
    font-weight: 500;
}

/* Checklist Preview */
.checklist-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.detail-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.3s ease;
    cursor: pointer;
}

.detail-checkbox:hover {
    background: var(--light-bg);
}

.detail-checkbox.checked {
    background: rgba(76, 175, 80, 0.1);
}

.detail-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--success-color);
}

.detail-checkbox span {
    font-size: 13px;
    color: var(--dark-text);
}

.notes-text {
    color: var(--dark-text);
    line-height: 1.6;
    font-size: 14px;
    background: var(--light-bg);
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

/* Metadata */
.metadata-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metadata-grid > div {
    display: flex;
    flex-direction: column;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.badge-warning {
    background: rgba(255, 152, 0, 0.2);
    color: #f57c00;
}

.badge-danger {
    background: rgba(244, 67, 54, 0.2);
    color: #c62828;
}

.badge-info {
    background: rgba(33, 150, 243, 0.2);
    color: #1565c0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
    }
    
    .nav-link {
        flex: 1;
        min-width: 150px;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .top-bar {
        padding: 15px 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .action-bar {
        flex-direction: column;
    }
    
    .search-form {
        width: 100%;
    }
    
    .detail-header {
        flex-direction: column;
    }
    
    .metadata-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .sidebar-header h1 {
        font-size: 18px;
    }
    
    .nav-link .label {
        display: none;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-card {
        padding: 15px;
    }
    
    .kpi-number {
        font-size: 24px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}
