:root {
    --primary: #FAA83A;
    --primary-hover: #e09228;
    --secondary: #152E62;
    --success: #266F63;
    --danger: #EA4309;
    --dark: #343a40;
    --muted: #6c757d;
    --light: #f8f9fa;
    --white: #ffffff;
    
    --bg-body: #f8f9fa;
    --card-bg: #ffffff;
    
    --primary-gradient: linear-gradient(135deg, #FAA83A 0%, #EA4309 100%);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.05);
    
    /* Legacy variables mapping */
    --my_blue: var(--secondary);
    --my_orange: var(--primary);
    --my_green: var(--success);
    --my_red: var(--danger);
}

body {
    background-color: var(--bg-body);
    color: var(--dark);
    font-family: 'Quicksand', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.pagehead {
    font-size: 20px;
    font-weight: 700;
    color: "#222222";
    letter-spacing: -0.5px;
}

.white_card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
}

.profile_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary);
}

.card_item {
    background-color: var(--white);
    border-radius: 20px;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 12px;
    transition: transform 0.2s;
}

.card_item:active {
    transform: scale(0.98);
}

.time_label {
    color: var(--primary);
    font-weight: 600;
}

.mybtn {
    border-radius: var(--radius-md);
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.mybtn:active {
    transform: scale(0.95);
    background-color: var(--primary-hover);
}

.status_btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: all ease-in-out 0.2s;
    background-color: var(--white);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
}

.status_btn.active {
    background-color: var(--success);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

/* Camera Styles */
#video {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.camerabtn {
    font-size: 24px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: var(--shadow-md);
}

.cameradonebtn {
    font-size: 16px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: var(--radius-full);
    padding: 10px 30px;
    box-shadow: var(--shadow-md);
    font-weight: 600;
}

.flipCamera {
    font-size: 20px;
    background-color: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    color: var(--white);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 8%;
    right: 10%;
    border: 1px solid rgba(255,255,255,0.3);
}

.preview_image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.status_gif {
    width: 180px;
    height: 180px;
    position: absolute;
    top: 50%;
    left: 50%;
    padding: 40px;
    object-fit: cover;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.5);
    transform: translate(-50%, -50%);
}

.float_btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    font-size: 20px;
    width: 56px;
    height: 56px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--my_orange);
    color: white;
    box-shadow: var(--shadow-md);
    z-index: 100;
    transition: transform 0.2s;
}

.float_btn:active {
    transform: scale(0.9);
}

.camera_container {
    background-color: #000;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
}

/* Sidebar Menu */
.menupop {
    background-color: var(--white);
    z-index: 2000;
    padding: 24px 16px;
    border-top-right-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    position: fixed;
    left: 0px;
    top: 0px;
    width: 280px;
    max-width: 80vw;
    height: 100%;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
}

.menupop.active {
    transform: translateX(0);
}

.menuitem {
    margin-bottom: 8px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.menuitem:active {
    background-color: var(--light);
}

.menuitem.active {
    background-color: rgba(250, 168, 58, 0.1); /* Primary with opacity */
    color: var(--primary);
}

.menuitem i {
    width: 20px;
    text-align: center;
    color: inherit;
}

.menupop_image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

/* Forms */
input.form-control, select.form-control, textarea.form-control {
    background-color: var(--light);
    border: 1px solid transparent;
    border-radius: var(--radius-md) !important;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--dark);
    box-shadow: none !important;
}

input.form-control:focus, select.form-control:focus {
    background-color: var(--white);
    border-color: rgba(250, 168, 58, 0.3); /* Primary light */
}

.modal-content {
    border-radius: var(--radius-lg) !important;
    border: none;
    box-shadow: var(--shadow-md);
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.modal-footer {
    border-top: none;
}

/* Toast */
#toast {
    position: fixed;
    top: 20px;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    color: white;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 999999999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    font-size: 10px;
    box-shadow: var(--shadow-md);
    max-width: 90vw;
}

#toast.show {
    transform: translateX(-50%) translateY(0);
}

#toast.success { background-color: var(--success); }
#toast.warning { background-color: var(--danger); }

/* Animation */
@keyframes cardanim {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.anim_card {
    opacity: 0;
    animation: 0.4s ease-out forwards cardanim;
}

.anim_card:nth-child(1) { animation-delay: 0.05s; }
.anim_card:nth-child(2) { animation-delay: 0.1s; }
.anim_card:nth-child(3) { animation-delay: 0.15s; }
.anim_card:nth-child(4) { animation-delay: 0.2s; }

.export_btn {
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    color: white;
    background-color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    border: none;
}

.white_bg {
    background-color: var(--white);
    border-radius: var(--radius-md);
    padding: 12px;
}

.icon_btn {
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Toggles */
.customtoggle {
    border-radius: var(--radius-full);
    width: 48px;
    height: 28px;
    background-color: var(--light);
    border: 2px solid rgba(0,0,0,0.1);
    transition: all 0.2s;
    position: relative;
    cursor: pointer;
}

.customtoggle::after {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--muted);
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.customtoggle.active {
    background-color: rgba(38, 111, 99, 0.1);
    border-color: var(--success);
}

.customtoggle.active::after {
    background-color: var(--success);
    transform: translateX(20px);
}

.offlineSyncBtn {
    margin-top: auto;
    padding: 16px;
    background-color: var(--success);
    color: white;
    border-radius: var(--radius-md);
    margin: 16px;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s;
}

.offlineSyncBtn:active {
    transform: scale(0.98);
}

#menuBackdrop {
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1900;
}

#menuBackdrop.active {
    opacity: 1;
    pointer-events: all;
}

.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.myToggle{
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 1rem;
}

.myToggle>div {
    border-radius: var(--radius-full);
    padding: 5px 10px;
    border: 1px solid gray;
    flex: 1;
    transition: all 0.2s;
}

.myToggle>div.active {
    background-color: var(--my_green);
    color: white;
}

.id_verified_status{
    font-size: 12px;
}

.id_verified_status.verified{
    color: var(--success);
}

.id_verified_status.not_verified{
    color: var(--danger);
}

#digitalClock{
    font-size: 1.8rem;
    border-radius: 20px;
    border: 2px dashed var(--dark);
    letter-spacing: 2px;
    padding: 10px 0px;
}

/* Timeline Improvements */
.timeline-item {
    border-left: 2px solid rgba(250, 168, 58, 0.3);
    padding-left: 24px;
    position: relative;
    padding-bottom: 24px;
}
.timeline-item:last-child {
    border-left: 2px solid transparent;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(250, 168, 58, 0.15);
}

.timeline-content {
    background: rgba(255,255,255,0.7);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: transform 0.2s;
}

.timeline-content:active {
    transform: scale(0.98);
}