:root {
    --proc-primary: #f97316;
    --proc-primary-hover: #ea580c;
    --proc-primary-light: #fff7ed;
    --proc-primary-glow: rgba(249, 115, 22, 0.15);
    --proc-bg: #fafaf9;
    --proc-card: #ffffff;
    --proc-sidebar-bg: #0c0a09;
    --proc-sidebar-text: #a8a29e;
    --proc-border: #e7e5e4;
    --proc-text: #1c1917;
    --proc-text-muted: #78716c;
    --proc-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --proc-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --proc-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --proc-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);
}

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

body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

.proc-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--proc-bg);
    color: var(--proc-text);
    line-height: 1.6;
}

/* ==================== Auth Pages ==================== */
.proc-auth-bg {
    background: linear-gradient(135deg, #0c0a09 0%, #1c1917 40%, #292524 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.proc-auth-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(249,115,22,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(249,115,22,0.05) 0%, transparent 40%);
    animation: authBgFloat 20s ease-in-out infinite;
}

@keyframes authBgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-0.5deg); }
}

.proc-auth-container { width: 100%; max-width: 400px; padding: 1rem; position: relative; z-index: 1; }

.proc-auth-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
}

.proc-auth-header {
    text-align: center;
    padding: 2.5rem 2rem 0.5rem;
}

.proc-auth-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 16px rgba(249,115,22,0.3);
}

.proc-auth-header h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--proc-text);
    margin-bottom: 0.25rem;
}

.proc-auth-header small {
    color: var(--proc-text-muted);
    font-size: 0.875rem;
}

.proc-auth-body { padding: 1.5rem 2rem 2rem; }

.proc-auth-body .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--proc-text);
    margin-bottom: 0.375rem;
}

.proc-auth-body .form-control {
    border-radius: 10px;
    border: 1.5px solid var(--proc-border);
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.proc-auth-body .form-control:focus {
    border-color: var(--proc-primary);
    box-shadow: 0 0 0 3px var(--proc-primary-glow);
}

.proc-auth-body .input-group-text {
    border-radius: 10px 0 0 10px;
    border: 1.5px solid var(--proc-border);
    border-right: none;
    background: #fafaf9;
    color: var(--proc-text-muted);
}

.proc-auth-body .input-group .form-control {
    border-radius: 0 10px 10px 0;
}

/* ==================== Sidebar ==================== */
.proc-layout { min-height: 100vh; }

.proc-sidebar {
    width: 250px;
    background: var(--proc-sidebar-bg);
    color: var(--proc-sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

.proc-sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.proc-sidebar-brand h5 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.proc-sidebar-brand h5 i {
    color: var(--proc-primary);
}

.proc-sidebar .nav { padding: 0.75rem 0; }

.proc-sidebar .nav-link {
    color: var(--proc-sidebar-text);
    padding: 0.625rem 1.25rem;
    margin: 2px 10px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.proc-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
    transform: translateX(2px);
}

.proc-sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--proc-primary), var(--proc-primary-hover));
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}

.proc-sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #fff;
    border-radius: 0 4px 4px 0;
}

.proc-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 0.9375rem;
}

.proc-sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.proc-avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(249,115,22,0.2), rgba(249,115,22,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--proc-primary);
}

/* ==================== Main Content ==================== */
.proc-main {
    margin-left: 250px;
    min-height: 100vh;
    background: var(--proc-bg);
}

.proc-content { padding: 2rem 2.5rem; max-width: 1400px; }

.proc-header { margin-bottom: 2rem; }
.proc-header h3 { font-weight: 800; font-size: 1.5rem; margin-bottom: 0.25rem; letter-spacing: -0.025em; }
.proc-header p { color: var(--proc-text-muted); font-size: 0.9375rem; }

/* ==================== Cards ==================== */
.proc-card {
    background: var(--proc-card);
    border-radius: 16px;
    border: 1px solid var(--proc-border);
    padding: 1.75rem;
    box-shadow: var(--proc-shadow-sm);
    transition: box-shadow 0.3s ease;
}

.proc-card:hover {
    box-shadow: var(--proc-shadow);
}

.proc-stat-card {
    background: var(--proc-card);
    border-radius: 16px;
    border: 1px solid var(--proc-border);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.proc-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 60%, rgba(249,115,22,0.03));
    pointer-events: none;
}

.proc-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--proc-shadow-lg);
    border-color: rgba(249,115,22,0.2);
}

.proc-stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.proc-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1;
}

.proc-stat-label {
    font-size: 0.8125rem;
    color: var(--proc-text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

.proc-handler-card {
    background: var(--proc-card);
    border-radius: 16px;
    border: 1px solid var(--proc-border);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.proc-handler-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--proc-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.proc-handler-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--proc-shadow-xl);
    border-color: rgba(249,115,22,0.3);
}

.proc-handler-card:hover::after {
    opacity: 1;
}

.proc-handler-icon {
    width: 72px; height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: var(--proc-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.proc-handler-card:hover .proc-handler-icon {
    transform: scale(1.1) rotate(-3deg);
}

.proc-handler-card h5 {
    font-weight: 700;
    font-size: 1.0625rem;
    margin-bottom: 0.5rem;
}

.proc-handler-card p {
    color: var(--proc-text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

/* ==================== Upload Zone ==================== */
.proc-upload-zone {
    border: 2px dashed var(--proc-border);
    border-radius: 16px;
    padding: 3.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #fff7ed 0%, #fafaf9 100%);
    position: relative;
}

.proc-upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(circle at center, rgba(249,115,22,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.proc-upload-zone:hover, .proc-upload-zone-active {
    border-color: var(--proc-primary);
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    transform: scale(1.01);
    box-shadow: 0 0 0 4px var(--proc-primary-glow);
}

.proc-upload-zone:hover::before, .proc-upload-zone-active::before {
    opacity: 1;
}

.proc-upload-zone i.fa-cloud-upload-alt {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.proc-upload-zone:hover i.fa-cloud-upload-alt {
    transform: translateY(-4px) scale(1.1);
}

/* ==================== Buttons ==================== */
.btn-proc-primary {
    background: linear-gradient(135deg, var(--proc-primary), var(--proc-primary-hover));
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 12px;
    padding: 0.625rem 1.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-proc-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-proc-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249,115,22,0.35);
}

.btn-proc-primary:hover::before {
    left: 100%;
}

.btn-proc-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px rgba(249,115,22,0.2);
}

.bg-proc-primary { background: var(--proc-primary) !important; }

/* ==================== Table ==================== */
.proc-card .table {
    margin-bottom: 0;
}

.proc-card .table th {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--proc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom-width: 1px;
    padding: 0.75rem;
}

.proc-card .table td {
    padding: 0.875rem;
    vertical-align: middle;
    font-size: 0.9375rem;
}

.proc-card .table tbody tr {
    transition: background 0.15s ease;
}

.proc-card .table tbody tr:hover {
    background: rgba(249,115,22,0.03);
}

/* ==================== Form Controls ==================== */
.proc-card .form-control,
.proc-card .form-select {
    border-radius: 10px;
    border: 1.5px solid var(--proc-border);
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.proc-card .form-control:focus,
.proc-card .form-select:focus {
    border-color: var(--proc-primary);
    box-shadow: 0 0 0 3px var(--proc-primary-glow);
}

.proc-card .form-check-input:checked {
    background-color: var(--proc-primary);
    border-color: var(--proc-primary);
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.08); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.anim-fade-in { animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; }
.anim-slide-up { animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; }
.anim-slide-down { animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) both; }
.anim-bounce-in { animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

/* ==================== Badge ==================== */
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.75em;
    border-radius: 8px;
}

/* ==================== Alert ==================== */
.proc-alert {
    border-radius: 12px;
    border: none;
    font-size: 0.9375rem;
}




/* ==================== Mobile Bottom Tab Bar ==================== */
.proc-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--proc-border);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.proc-mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.375rem 0;
    text-decoration: none;
    color: var(--proc-text-muted);
    font-size: 0.6875rem;
    transition: all 0.2s ease;
    position: relative;
}

.proc-mobile-tab i {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
}

.proc-mobile-tab.active {
    color: var(--proc-primary);
}

.proc-mobile-tab.active::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--proc-primary);
    border-radius: 0 0 4px 4px;
}

.proc-mobile-tab:active {
    opacity: 0.7;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .proc-sidebar {
        display: none;
    }
    
    .proc-mobile-nav {
        display: flex;
    }
    
    .proc-main {
        margin-left: 0;
        padding-bottom: 70px;
    }
    
    .proc-content {
        padding: 1rem;
    }
    
    .proc-header h3 {
        font-size: 1.25rem;
    }
    
    .proc-header p {
        font-size: 0.875rem;
    }
    
    /* Auth pages mobile */
    .proc-auth-container {
        padding: 0.75rem;
    }
    
    .proc-auth-card {
        border-radius: 16px;
    }
    
    .proc-auth-header {
        padding: 2rem 1.5rem 0.5rem;
    }
    
    .proc-auth-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .proc-auth-body {
        padding: 1.25rem 1.5rem 1.5rem;
    }
    
    .proc-auth-body .form-control {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Cards mobile */
    .proc-card {
        padding: 1.25rem;
        border-radius: 14px;
    }
    
    .proc-stat-card {
        padding: 1.25rem;
        border-radius: 14px;
    }
    
    .proc-stat-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    
    .proc-stat-value {
        font-size: 1.5rem;
    }
    
    .proc-handler-card {
        padding: 1.5rem 1rem;
        border-radius: 14px;
    }
    
    .proc-handler-icon {
        width: 60px;
        height: 60px;
        border-radius: 14px;
        font-size: 1.5rem;
    }
    
    .proc-handler-card h5 {
        font-size: 1rem;
    }
    
    /* Upload zone mobile */
    .proc-upload-zone {
        padding: 2rem 1.5rem;
        border-radius: 14px;
    }
    
    .proc-upload-zone i.fa-cloud-upload-alt {
        font-size: 2.5rem !important;
    }
    
    /* Buttons mobile */
    .btn-proc-primary {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        border-radius: 12px;
    }
    
    .btn-proc-primary.w-100 {
        padding: 0.875rem 1.25rem;
    }
    
    /* Table mobile */
    .proc-card .table-responsive {
        border-radius: 10px;
        overflow: hidden;
    }
    
    .proc-card .table th,
    .proc-card .table td {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .proc-card .table td .btn-group {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .proc-card .table td .btn-group .btn {
        padding: 0.375rem 0.5rem;
    }
    
    /* Form mobile */
    .proc-card .form-control,
    .proc-card .form-select {
        padding: 0.625rem 0.875rem;
        font-size: 0.9375rem;
    }
    
    /* Verify page mobile */
    .proc-auth-body input[name="code"] {
        font-size: 1.5rem !important;
        letter-spacing: 0.5em !important;
        padding: 0.625rem !important;
    }
    
    /* Breadcrumb mobile */
    .breadcrumb {
        font-size: 0.8125rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.375rem;
    }
    
    /* Row gaps mobile */
    .row.g-4 > [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .row.g-4 {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    /* Alert mobile */
    .proc-alert {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    /* Sidebar footer mobile */
    .proc-sidebar-footer {
        padding: 0.875rem 1rem;
    }
    
    .proc-sidebar-footer .small {
        font-size: 0.75rem;
    }
    
    /* Process page mobile */
    .proc-card h5 {
        font-size: 0.9375rem;
    }
    
    /* Admin page mobile */
    .proc-card .row.g-2 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .proc-content {
        padding: 0.75rem;
        padding-top: 3.5rem;
    }
    
    .proc-header h3 {
        font-size: 1.125rem;
    }
    
    .proc-stat-card {
        padding: 1rem;
        gap: 0.875rem;
    }
    
    .proc-stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .proc-stat-value {
        font-size: 1.25rem;
    }
    
    .proc-handler-card {
        padding: 1.25rem 0.875rem;
    }
    
    .proc-handler-icon {
        width: 52px;
        height: 52px;
        font-size: 1.25rem;
    }
    
    .proc-upload-zone {
        padding: 1.5rem 1rem;
    }
    
    .proc-auth-body {
        padding: 1rem 1.25rem 1.25rem;
    }
    
    .proc-auth-body input[name="code"] {
        font-size: 1.25rem !important;
        letter-spacing: 0.4em !important;
    }
}
