* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    background: linear-gradient(180deg, #eef2f6 0%, #f5f7fa 100%);
    color: #1f2937;
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 50px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo i {
    font-size: 48px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.login-logo p {
    color: #718096;
    margin-top: 8px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 18px;
    transition: color 0.3s;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f7fafc;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-control:focus + i {
    color: #6366f1;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.alert.show {
    display: block;
}

.alert-danger {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.main-layout {
    display: flex;
    height: calc(100vh - 24px);
    margin: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #fbfcfe 0%, #f6f8fb 100%);
    border: 1px solid #e3e9f0;
    border-radius: 28px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
}

.sidebar {
    width: 214px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 14px 14px;
    border-right: 1px solid #e8edf3;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 10px;
}

.brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(180deg, #eef4fb 0%, #dfeaf8 100%);
    border: 1px solid #d7e4f3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #466a94;
    font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.brand-text {
    min-width: 0;
}

.sidebar-header h1 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.sidebar-header p {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 12px;
}

.sidebar-section-label {
    padding: 0 8px;
    color: #a0aec0;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 0 4px 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #dbe3ec;
    border-radius: 999px;
}

.menu-item {
    margin-bottom: 2px;
}

.menu-link {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 12px;
    color: #6b7280;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.menu-link:hover,
.menu-link.active-parent {
    background: #f3f6fa;
    color: #334155;
    transform: translateX(2px);
}

.menu-link.active {
    background: linear-gradient(135deg, #edf3fe 0%, #e4eefc 100%);
    color: #345f97;
    box-shadow: inset 0 0 0 1px #d7e4f5;
}

.menu-link i {
    width: 18px;
    margin-right: 12px;
    font-size: 14px;
    opacity: 0.88;
}

.menu-link .arrow {
    margin-left: auto;
    transition: transform 0.3s;
    opacity: 0.72;
}

.menu-link.expanded .arrow {
    transform: rotate(90deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin-top: 6px;
    margin-left: 16px;
    padding-left: 12px;
    border-left: 1px solid #e5ebf2;
}

.submenu.open {
    max-height: 500px;
}

.submenu .menu-link {
    min-height: 40px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 10px;
}

.sidebar-footer {
    padding: 0 4px;
}

.user-card {
    padding: 14px;
    border-radius: 16px;
    background: #f7f9fc;
    border: 1px solid #e6ecf3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.user-info {
    display: flex;
    align-items: center;
    padding: 0;
    margin-bottom: 12px;
}

.user-info:hover {
    background: transparent;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #edf4ff 0%, #dce9f8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #466a94;
    font-weight: 600;
    font-size: 16px;
    margin-right: 12px;
}

.user-details {
    flex: 1;
}

.user-name {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
}

.user-role {
    color: #94a3b8;
    font-size: 12px;
}

.user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
}

.btn-logout {
    width: 100%;
    height: 40px;
    background: #ffffff;
    border: 1px solid #d9e3ef;
    border-radius: 12px;
    color: #3f5f86;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-logout:hover {
    background: #f8fbff;
    border-color: #c8d7e8;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(59, 91, 125, 0.08);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 12px;
    padding: 14px 16px 16px;
    background: transparent;
}

.app-header {
    min-height: 72px;
    background: #ffffff;
    border: 1px solid #e6ecf2;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    gap: 16px;
}

.app-header-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f1f5fb 0%, #e6edf7 100%);
    color: #54769b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.app-header-title {
    color: #24364b;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.app-header-subtitle {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
}

.app-header-side {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    padding-right: 16px;
    border-right: 1px solid #edf2f7;
}

.header-time-label {
    color: #7b8794;
    font-size: 12px;
}

.header-time-value {
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.header-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.header-user-role {
    color: #7b8794;
    font-size: 12px;
}

.header-user-name {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.tabs-header {
    min-height: 52px;
    background: #ffffff;
    border: 1px solid #e6ecf2;
    border-radius: 18px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 14px;
}

.tabs-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 16px;
    border-right: 1px solid #edf2f7;
    color: #7b8794;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tabs-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    flex: 1;
    padding: 8px 0;
}

.tabs-list::-webkit-scrollbar {
    height: 6px;
}

.tabs-list::-webkit-scrollbar-thumb {
    background: #cfdae5;
    border-radius: 999px;
}

.tab-item {
    display: flex;
    align-items: center;
    height: 34px;
    padding: 0 12px;
    background: #f7f9fc;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    gap: 8px;
    transition: all 0.3s;
    color: #7b8794;
    flex-shrink: 0;
}

.tab-item:hover {
    background: #eff4f8;
    color: #4b6078;
}

.tab-item.active {
    background: linear-gradient(180deg, #edf3fe 0%, #e4eefc 100%);
    border-color: #d7e4f5;
    color: #456b99;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.tab-close {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6b7f95;
    transition: all 0.3s;
    opacity: 0;
}

.tab-item:hover .tab-close,
.tab-item.active .tab-close {
    opacity: 1;
}

.tab-close:hover {
    background: #dde8f5;
    color: #456b99;
}

.tabs-content {
    flex: 1;
    overflow: hidden;
    border-radius: 22px;
}

.tab-content {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e6ecf2;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.tab-content.active {
    display: block;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 198px;
    }

    .app-header {
        padding: 18px 20px;
        align-items: flex-start;
        flex-direction: column;
    }

    .app-header-side {
        width: 100%;
        justify-content: space-between;
    }
}

.page-container {
    padding: 24px;
    height: 100%;
    overflow-y: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 24px;
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-success {
    background: #48bb78;
    color: #fff;
}

.btn-danger {
    background: #fc8181;
    color: #fff;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    font-size: 13px;
    text-transform: uppercase;
}

.table td {
    color: #2d3748;
}

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

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f7fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    font-size: 18px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #fed7d7;
    color: #c53030;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #6366f1;
}

.enterprise-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-select {
    min-width: 140px;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.search-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-search {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-reset {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-reset:hover {
    background: #e2e8f0;
}

.quick-tags {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.quick-tag {
    padding: 14px 18px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
    text-align: center;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.quick-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.quick-tag.active {
    border-color: currentColor;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.quick-tag .tag-count {
    font-size: 26px;
    font-weight: 800;
    display: block;
    line-height: 1.1;
}

.quick-tag .tag-name {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 600;
}

.tag-all {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
}

.tag-auth {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-policy {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-contract {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-shoot {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-material {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-evaluate {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-followup {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-complete {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-cash {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

.tag-operator {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
}

.tag-supervisor {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7c3aed;
}

.tag-pass {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
}

.table-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.table-wrapper {
    flex: 1;
    overflow: auto;
}

.enterprise-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.enterprise-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 14px 10px;
    text-align: center;
    font-weight: 700;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.enterprise-table td {
    padding: 14px 10px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
    transition: background 0.2s;
}

.enterprise-table tr:hover td {
    background: #f8fafc;
}

.company-cell {
    text-align: left !important;
}

.company-name {
    font-weight: 600;
    color: #1e293b;
}

.company-info {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.process-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.process-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #f1f5f9;
    position: relative;
}

.process-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
}

.process-dot.green {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.process-dot.green::after {
    background: #22c55e;
}

.process-dot.orange {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.process-dot.orange::after {
    background: #f59e0b;
}

.process-dot.red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.process-dot.red::after {
    background: #ef4444;
}

.process-dot.purple {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.process-dot.purple::after {
    background: #8b5cf6;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.red {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge.orange {
    background: #fef3c7;
    color: #b45309;
}

.status-badge.purple {
    background: #f3e8ff;
    color: #7c3aed;
}

.status-badge.green {
    background: #dcfce7;
    color: #16a34a;
}

.btn-view {
    background: transparent;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-view:hover {
    background: #f0f4ff;
}

.pagination-section {
    padding: 18px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.pagination-info {
    color: #64748b;
    font-size: 14px;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-color: #6366f1;
}

.detail-modal .modal-dialog {
    max-width: 900px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
}

.detail-label {
    width: 100px;
    color: #64748b;
    font-size: 14px;
    flex-shrink: 0;
}

.detail-value {
    flex: 1;
    color: #1e293b;
    font-size: 14px;
    word-break: break-all;
}

.detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.detail-section h4 {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 16px;
}

.detail-modal .modal-dialog {
    max-width: 1200px;
}

.detail-modal .modal-content {
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.detail-modal .modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.detail-tabs {
    display: flex;
    gap: 4px;
    padding: 16px 24px 0;
    border-bottom: 2px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}

.detail-tab {
    padding: 12px 28px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s;
    border-radius: 8px 8px 0 0;
}

.detail-tab:hover {
    background: rgba(99, 102, 241, 0.05);
    color: #475569;
}

.detail-tab.active {
    background: #fff;
    color: #6366f1;
    border-bottom-color: #6366f1;
}

.detail-tab-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.detail-tab-content {
    display: none;
}

.detail-tab-content.active {
    display: block;
}

.detail-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px 20px;
}

.detail-form-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-form-item.full-width {
    grid-column: 1 / -1;
}

.detail-form-item.half-width {
    grid-column: span 2;
}

.detail-form-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.detail-form-input {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.detail-form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.detail-form-textarea {
    min-height: 100px;
    resize: vertical;
}

.detail-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .detail-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

.detail-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.detail-image-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-image-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.detail-image-preview {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.detail-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-image-preview i {
    font-size: 32px;
    color: #cbd5e1;
}

.detail-material-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.detail-material-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.detail-material-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.detail-material-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}

.detail-material-btn.secondary:hover {
    background: #e2e8f0;
    box-shadow: none;
}

.detail-material-btn.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.detail-material-btn.success:hover {
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.detail-material-btn.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.detail-material-btn.warning:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.script-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.script-table th {
    background: #f8fafc;
    padding: 10px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 13px;
    border: 1px solid #e2e8f0;
}

.script-table td {
    padding: 8px;
    border: 1px solid #e2e8f0;
}

.script-table input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
}

.script-table input:focus {
    outline: none;
    border-color: #6366f1;
}

.script-table-btn {
    padding: 6px 12px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.script-table-add {
    padding: 8px 16px;
    background: #f0f9ff;
    color: #0369a1;
    border: 1px dashed #0369a1;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
}

.detail-footer-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.detail-footer-btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.detail-footer-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.detail-footer-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.detail-footer-btn.success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.detail-footer-btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
}

.detail-footer-btn.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.detail-footer-btn.warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.detail-footer-btn.secondary {
    background: #e2e8f0;
    color: #475569;
}

.detail-footer-btn.secondary:hover {
    background: #cbd5e1;
    transform: translateY(-1px);
}

.detail-modal .modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.modal-header {
    flex-direction: row;
    align-items: flex-start;
    padding: 16px 24px;
}

.modal-header > div {
    flex: 1;
}

.modal-title {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.modal-subtitle {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}
