:root {
    --orange: #FF7A00;
    /* primary */
    --black: #000;
    --white: #fff;
    --muted: #f6f7f9;
    --radius: 16px;
    --shadow: 0 12px 30px rgba(0, 0, 0, .08);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial;
    background: linear-gradient(180deg, #fff7ee 0%, #fff 40%, #fff 100%);
    color: var(--black);
}

/* Offline banner */
.offline {
    background: #111;
    color: #fff;
    text-align: center;
    padding: .5rem;
    font-size: .9rem;
}

.hidden {
    display: none
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
}

.brand {
    font-weight: 800;
    color: var(--orange);
    letter-spacing: .5px
}

.top-actions {
    display: flex;
    gap: 10px;
    align-items: center
}

/***************************
 Buttons
 **************************/
.btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background .2s ease, color .2s ease;
}

.btn:hover {
    transform: translateY(-1px)
}

.btn.primary {
    background: var(--orange);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(255, 122, 0, .18)
}

.btn.secondary {
    background: var(--black);
    color: var(--white)
}

.btn.outline {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, .1)
}

.btn:active {
    transform: scale(.98)
}
/***************************************
* Button End
****************************************/

/********************************************
 Toggle switch (theme)
********************************************/
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ddd;
    transition: .2s;
    border-radius: 26px
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: white;
    transition: .2s;
    border-radius: 50%
}

input:checked+.slider {
    background: var(--orange)
}

input:checked+.slider:before {
    transform: translateX(22px)
}

/* Layout */
.layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px 40px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    min-height: 80%;
}

/*************************************
* Card (flip)
**************************************/
.card {
    position: relative;
    perspective: 1000px;
    background: #fff;
}

.card-inner {
    position: relative;
    width: 100%;
    min-height: 300px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transform-style: preserve-3d;
    transition: transform .6s;
}

.card.flip .card-inner {
    transform: rotateY(180deg)
}

.card-face {
    position: absolute;
    inset: 0;
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(255, 122, 0, .08);
    background: #fff;
}

.card-front {}

.card-back {
    transform: rotateY(180deg)
}
/**************************************************
*          Card End
***************************************************/

.tag {
    font-size: .75rem;
    font-weight: 700;
    color: var(--white);
    background: var(--orange);
    padding: 4px 8px;
    border-radius: 999px;
    display: inline-block
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.select {
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .1)
}

.content {
    font-size: 1.25rem;
    line-height: 1.45;
    min-height: 120px;
    animation: fadeIn .24s ease
}

.meta {
    color: #666;
    font-size: .9rem
}

.actions {
    margin-top: auto;
    display: flex;
    gap: 8px
}

/***************************************
   Skeleton loader 
 **********************************/
.skeleton {
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
    border: 1px solid rgba(0, 0, 0, .06);
}

@keyframes shimmer {
    0% {
        background-position: 100% 0
    }

    100% {
        background-position: 0 0
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/************************************
 Sidebar panels 
************************************/
.sidebar .panel {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, .05)
}

.panel+.panel {
    margin-top: 14px
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px
}

.search {
    flex: 1;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .12)
}

.list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 10px;
    padding: 8px 10px;
}

.list .mini {
    font-size: .9rem
}

/*******************************************
* Slide Panel End
*******************************************/

/*********************************************
* Dark mode
******************************************/
body.dark {
    background: linear-gradient(180deg, #111 0%, #1a1a1a 40%, #111 100%);
    color: #f3f3f3;
}

body.dark .card {
    background: #161616;
    border-color: #2a2a2a
}

body.dark .card-face,
body.dark .sidebar .panel,
body.dark .list li {
    background: #161616;
    border-color: #2a2a2a
}

body.dark .meta {
    color: /*#aaa*/ #fff
}

body.dark .btn.outline {
    border-color: #333;
    color: #f3f3f3
}
body.dark .content {
    color:
        /*#aaa*/
        #fff
}
body.dark footer img {
    color: #fff;
    background: #f5f5f5;
}
