/* main.css  */
:root {
    --bg: #2E2E2E;
    --primary: #242628;
    --panel: #383838;
    --panel-2: #5D5D5D;
    --border: #3b3e42;
    --muted: #a5aab3;
    --text: #e8eaee;
    --accent: #195EBD;
    --accent-2: #294B79;
    --lightblue:#619AE9;
    --accent-red: #e91e1e;
    --accent-red2: #ac0d0d;
    --chip: #0a0a0a;
    --ok: #9cffa6;
    --shadow: 0 8px 40px rgba(0, 0, 0, .35);
    --radius: 18px;

    /* Warning colors that match your pattern */
    --warning: #f39c12;
    --warning-2: #e67e22;
    --warning-light: #ffc947;
    --warning-dark: #d68910;
    --warning-bg: #3d3012;
    --warning-border: #5a4619;

    --max-height: 70vh;

}

html,
body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    overflow-y: hidden;
    max-height: 100vh;
}

/* Top bar */
.topbar {
    padding: 6px 12px 0px 12px;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.brand-name img {
    width: 15rem;
}


.user-meta {
    font-size: 14px;
    color: #cfd3da;
    display: flex;
    gap: .75rem;
    align-items: center;
}

.user-meta a {
    color: #9bb3ff;
    text-decoration: none;
}

.user-meta a:hover {
    text-decoration: underline;
}

/* Main canvas */
.canvas {
    max-width: 1920px;
    margin: 0px auto 0px;
    background: transparent;
    width: 75vw;

}

.workspace {
    background: var(--panel);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    position: relative;
}

/* Section titles */
.section-title {
    font-weight: 600;
    color: #cfd3da;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 5px;
}

.section-title i {
    font-size: 18px;
    color: #d4d8df;
}

/* Form controls */
.form-label {
    font-size: 14px;
    color: var(--text);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    height: 36px;
    padding: 6px 10px;
    border-radius: 10px;
}

textarea.form-control {
    height: auto;
    min-height: 60px;
}

.form-control:focus,
.form-select:focus {
    box-shadow: none;
    border-color: #6b7cff;
    background: var(--panel-2);
    color: var(--text);
}

.form-control:disabled,
.form-select:disabled {
    background: #1a1c1e;
    opacity: 0.6;
}

.small-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #1d1f22;
    border: 1px solid var(--border);
    color: #cfd3da;
    padding: 6px 10px;
    border-radius: 999px;
    height: 36px;
}


.btn-pill {
    border-radius: 999px;
}

/* Detail card */
.detail-card {
    border: 2px solid #164bff;
    border-radius: 14px;
    padding: 16px;
    background: #212327;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Accordion sections */
.accordion-custom {
    margin-top: 20px;
}

.accordion-item {
    background: var(--panel-2);
    border: none;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
}

.accordion-button {
    background: var(--panel-2);
    color: var(--text);
    border: none;
    padding: 15px 20px;
    font-size: 1.5rem;
    font-weight: 500;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3E%3Cpath d='M2 8a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11A.5.5 0 0 1 2 8Z'/%3E%3C/svg%3E");
    transition: all 0.3s ease;
    width: 20px;
    height: 20px;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3E%3Cpath d='M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2Z'/%3E%3C/svg%3E");
    transition: all 0.3s ease;
    width: 20px;
    height: 20px;
}


.accordion-button:not(.collapsed) {
    background: var(--panel-2);
    color: var(--text);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    background: var(--panel);
    padding: 20px;
}

/* Account cards */
.account-card,
.item-card {
    background: #FFF;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.account-card:hover,
.item-card:hover {
    background: #3a3d43;
}

.account-expand-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Add button */
.btn-add-item {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-add-item:hover {
    background: var(--accent-2);
}

/* Publish section */
.publish-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 2px;
}

.autosave {
    color: #b8bdc7;
    font-size: 13px;
    font-style: italic;
}

.btn-publish {
    background: white;
    border-radius: 999px;
    padding: 10px 24px;
    border: none;
    color: var(--bg);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Floating elements */
.side-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 110px;
    background: #3a3d43;
    border-radius: 5px;
    opacity: .6;
}

.side-bar.left {
    left: -36px;
}

.side-bar.right {
    right: -36px;
}

.float-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 60px;
    background: #2f3236;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cfd3da;
    box-shadow: var(--shadow);
}

.float-circle.plus {
    left: -160px;
    bottom: -40px;
    font-size: 42px;
}

.float-circle.mic {
    right: -160px;
    bottom: -40px;
    font-size: 34px;
}

/* Side navigation */
.side-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    padding: 10px 5px;
    border-radius: 20px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.side-nav-text {
    color: white;
    font-size: 14px;
    letter-spacing: 2px;
}

/* Switch styling */
.label-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #eef2ff;
}

.switch-sm.form-check-input {
    width: 36px;
    height: 20px;
    cursor: pointer;
}

/* Section separator */
.section-separator {
    height: 2px;
    background: var(--border);
    margin: 20px 0;
    border-radius: 1px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--panel);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 1440px) {
    /* .float-circle {
        display: none;
    } */

    .canvas {
        max-width: 75vw;
        margin: auto;
    }
}

@media (max-width: 768px) {

    .canvas {
        position: relative;
        max-width: 100vw;
        width: 100vw;
    }

    .float-circle.plus {
        left: 0;
        bottom: 0;
    }

    .float-circle.mic {
        right: calc(80px - 100vw);
        bottom: 0;
    }


    .float-circle {
        position: relative;
        display: flex;
        flex-direction: row;
        justify-content: space-around;

        width: 60px;
        height: 60px;
        border-radius: 60px;

    }

    .workspace {
        padding: 18px;
    }

    .member-card {
        min-width: 220px;
    }



}

.text-muted {
    color: var(--panel-2) !important;
}

.newaccount-form{
    max-height: 79vh;
    overflow-y: auto;
    overflow-x: hidden;

}

.newaccount-form::-webkit-scrollbar {
    width: 8px;
}

.newaccount-form::-webkit-scrollbar-track {
    background: var(--panel-2);
    border-radius: 10px;
}

.newaccount-form::-webkit-scrollbar-thumb {
    background: var(--text);
    opacity: 0.3;
    border-radius: 10px;
}

.address-card {
    background-color: var(--panel-2) !important;
    border-radius: 10px !important;
    border: 1px solid var(--panel-2) !important;
    padding: 0.25rem 1rem;
}

.newaccount-form .card {
    border: 1px solid var(--panel-2) !important;
    border-radius: 12px !important;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.address-card .form-control,
.address-card .form-select {
    border-color: var(--text) !important;
    color: var(--text) !important;
}

.address-card .form-control,
.address-card .form-select {
    border-color: var(--text) !important;
    color: var(--text) !important;
}

/* Placeholder text color - white */
.address-card .form-control::placeholder {
    color: var(--text) !important;
    opacity: 1;
    /* Firefox reduces opacity by default */
}

/* For different browser compatibility */
.address-card .form-control::-webkit-input-placeholder {
    /* Edge/Webkit */
    color: var(--text) !important;
}

.address-card .form-control::-moz-placeholder {
    /* Firefox 19+ */
    color: var(--text) !important;
    opacity: 1;
}

.address-card .form-control:-ms-input-placeholder {
    /* IE 10-11 */
    color: var(--text) !important;
}

.address-card .form-control::-ms-input-placeholder {
    /* Microsoft Edge */
    color: var(--text) !important;
}

/* For select elements' placeholder option */
.address-card .form-select option[value=""][disabled] {
    color: var(--text) !important;
}


.address-card .form-control:focus,
.address-card .form-select:focus {
    border-color: var(--primary) !important;
}

.accordion-container {
    transition: all 0.3s ease;
    overflow: hidden;
}

.additional-info-section {
    transition: all 0.3s ease;
    height: 100%;
}

.accordion-container {
    transition: all 0.3s ease;
    overflow: hidden;
}

.additional-info-section {
    background-color: var(--panel-2);
    border-left: 3px solid var(--accent);
    transition: all 0.3s ease;
}

.toggle-btn {
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    transform: translateX(5px);
}

/* Animation for smooth transition */
.collapsing {
    transition: width 0.35s ease;
    width: 0;
    overflow: hidden;
}

.collapse.show {
    width: auto;
}

.personal-info-section {
    transition: all 0.3s ease;
}


.additional-info-btn {
    background: var(--panel);
    color: #cfe0ff;
    display: flex;
    flex-direction: column;
    /* Changed to column for vertical layout */
    align-items: center;
    justify-content: center;
    gap: 10px;
    /* Reduced gap for vertical layout */
    padding: 30px 15px;
    /* More vertical padding, less horizontal */
    writing-mode: vertical-rl;
    /* Makes text vertical, right to left */
    text-orientation: mixed;
    /* Keeps letters upright */
    height: 220px;
    width: auto;
    /* Adjust width as needed */
    letter-spacing: 2px;
    /* Optional: adds spacing between letters */
}

.additional-info-btn:hover {
    background: #123168;
}

.additional-info-btn .icon {
    display: inline-block;
    transform: rotate(0deg);
    /* Reset rotation since text is already vertical */
    transition: transform 0.3s ease;
    writing-mode: horizontal-tb;
    /* Keep icon horizontal if needed */
}

/* If you want the icon to point right/left instead of up/down when vertical */
.additional-info-btn.expanded .icon {
    transform: rotate(180deg);
}


.loading-select option[disabled] {
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"%3E%3Ccircle cx="10" cy="10" r="8" stroke="%23007bff" stroke-width="2" fill="none" stroke-dasharray="25 15"%3E%3CanimateTransform attributeName="transform" type="rotate" from="0 10 10" to="360 10 10" dur="1s" repeatCount="indefinite"/%3E%3C/circle%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}


.save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1000;
}

.save-indicator.saving {
    background: #ffa500;
    color: white;
}

.save-indicator.saved {
    background: #4CAF50;
    color: white;
}

.save-indicator.error {
    background: #f44336;
    color: white;
}

.draft-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ff9800;
    color: white;
    border-radius: 3px;
    font-size: 12px;
    margin-left: 8px;
}



.btn-add-vertical {
    background: var(--accent-2);
    color: #cfe0ff;
    border: none;
    border-radius: 0 5px 5px 0; /* Rounded corners on right side */
    padding: 10px 5px;
    bottom:0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    
    /* Vertical text */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 1.5rem;
    min-height: 18rem;
    width: 45px; /* Fixed width for vertical button */
    flex-shrink: 0; /* Prevents button from shrinking */
    border-radius: 10px;
    max-height: 25rem;
}

/* Rotate icon to match vertical orientation */
.btn-add-vertical i {
    writing-mode: horizontal-tb;
    transform: rotate(90deg);
    margin-bottom: 5px;
}

/* Hover effect */
.btn-add-vertical:hover {
    background: #123168;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}





.btn-add-new {
    background: var(--accent-2);
    color: #cfe0ff;
    border: none;
    border-radius: 0 5px 5px 0; /* Rounded corners on right side */
    padding: 10px 5px;
    bottom:0;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: end;
    transition: all 0.3s ease;
    
    /* Vertical text */
    text-orientation: mixed;
    font-size: 1rem;
    flex-shrink: 0; /* Prevents button from shrinking */
    border-radius: 10px;

}

/* Rotate icon to match vertical orientation */
.btn-add-new i {
    margin-left: 0.5rem;

}

/* Hover effect */
.btn-add-new:hover {
    background: #123168;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}



.side-bar.left::after {
    right: 10px;
}

.side-bar.right::after {
    left: 10px;
}

.side-bar:hover::after {
    opacity: 1;
    cursor: grab;
}

.side-bar:hover {
    cursor: grab;
}

/* Prevent text selection while dragging */
.side-bar.dragging {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}