* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.user-header {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-wrapper {
    display: inline-block;
    position: relative;
    cursor: pointer;
    margin-bottom: 10px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    transition: all 0.3s ease;
}

.avatar:hover {
    transform: scale(1.05);
    border-color: #fff;
}

.user-nickname {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.menu-list {
    list-style: none;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-link {
    display: block;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-left-color: #fff;
}

.menu-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left-color: #fff;
}

.menu-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
}

.content-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    background: #fff;
    color: #1e3c72;
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
    color: #fff;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: #333;
}

.card-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #1e3c72;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #1e3c72;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 2px rgba(30, 60, 114, 0.2);
}

.form-control::placeholder {
    color: #999;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: #1e3c72;
    color: #fff;
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 14px;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.action-btns {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    z-index: 10000;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #1e3c72;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.success {
    background-color: #10b981;
    color: #ffffff;
}

.toast.error {
    background-color: #ef4444;
    color: #ffffff;
}

.toast.warning {
    background-color: #f59e0b;
    color: #ffffff;
}

.toast.info {
    background-color: #3b82f6;
    color: #ffffff;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box .form-control {
    flex: 1;
    min-width: 200px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #1e3c72;
    color: #fff;
    border-color: #1e3c72;
}

.pagination .active {
    background: #1e3c72;
    color: #fff;
    border-color: #1e3c72;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
}

.empty-state p {
    font-size: 16px;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

.badge-reserved {
    background-color: #6c757d;
    color: #ffffff;
}

.badge-opened {
    background-color: #17a2b8;
    color: #ffffff;
}

.badge-court {
    background-color: #ffc107;
    color: #212529;
}

.badge-second-instance {
    background-color: #6610f2;
    color: #ffffff;
}

.badge-executing {
    background-color: #fd7e14;
    color: #ffffff;
}

.badge-finished {
    background-color: #28a745;
    color: #ffffff;
}

.badge-rejected {
    background-color: #dc3545;
    color: #ffffff;
}

.file-preview {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.file-item {
    width: 150px;
    text-align: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #e9ecef;
    transform: translateY(-5px);
}

.file-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.file-name {
    font-size: 12px;
    word-break: break-word;
    margin-bottom: 10px;
}

.file-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        margin-bottom: 20px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .table-responsive {
        overflow-x: scroll;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 10px 5px;
    }
    
    .action-btns {
        flex-direction: column;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box .form-control {
        min-width: 100%;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 10px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .user-header {
        padding: 15px;
    }
    
    .avatar {
        width: 60px;
        height: 60px;
    }
    
    .page-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        padding: 0;
    }
    
    .menu-link {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .user-header {
        padding: 10px;
    }
    
    .avatar {
        width: 50px;
        height: 50px;
    }
    
    .user-nickname {
        font-size: 16px;
    }
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #1e3c72;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9998;
}

.mask.active {
    display: block;
}

.payment-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    z-index: 9999;
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.payment-modal h3 {
    margin-bottom: 20px;
    color: #1e3c72;
}

.payment-amount {
    font-size: 36px;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 20px;
}

.payment-btn {
    background: #1e3c72;
    color: #fff;
    padding: 15px 40px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-btn:hover {
    background: #2a5298;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.qrcode-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.qrcode-img {
    max-width: 300px;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 10px;
}

.upload-box {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-box:hover {
    border-color: #1e3c72;
    background: #f8f9fa;
}

.upload-box i {
    font-size: 48px;
    color: #999;
    margin-bottom: 15px;
}

.upload-box p {
    color: #666;
    margin-bottom: 10px;
}

.upload-box small {
    color: #999;
    font-size: 12px;
}

.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.preview-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.preview-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 10px;
}

.preview-video,
.preview-audio {
    max-width: 90vw;
    max-height: 90vh;
}

.preview-pdf {
    width: 90vw;
    height: 90vh;
    border: none;
}

.warning-alert {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.warning-alert h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #fff;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.firm-warning-container {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.firm-warning-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.firm-warning-box:last-child {
    margin-bottom: 0;
}

.firm-warning-info {
    color: #333;
}

.firm-warning-name {
    font-weight: 500;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.firm-warning-date {
    font-size: 13px;
    color: #666;
}

.firm-warning-days {
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.firm-warning-days.expired {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

@media (max-width: 768px) {
    .warning-alert {
        padding: 15px;
    }
    
    .firm-warning-container {
        padding: 15px;
    }
    
    .firm-warning-box {
        flex-direction: column;
        gap: 10px;
        text-align: left;
    }
    
    .firm-warning-days {
        align-self: flex-start;
    }
}
