@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    /* Dark Theme (Grey Friends) */
    --bg: #252525;
    --panel: #464362;
    --accent: #ACA9BB;
    --accent-hover: #9491a3;
    --text: #ffffff;
    --text-dim: #ACA9BB;
    --glass: rgba(0, 0, 0, 0.2);
    --border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --input-bg: #333333;
}

[data-theme='light'] {
    /* Light Theme (Small Switch) */
    --bg: #EBEBEB;
    --panel: #A4F3F5;
    --accent: #008C93;
    --accent-hover: #00767c;
    --text: #252525;
    --text-dim: #008C93;
    --glass: rgba(255, 255, 255, 0.3);
    --border: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --input-bg: #ffffff;
}

* {
    margin: 0; padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.glass-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: 
        radial-gradient(circle at 10% 10%, var(--panel) 0%, transparent 50%),
        radial-gradient(circle at 90% 90%, var(--accent) 0%, transparent 50%);
    opacity: 0.4;
    z-index: -1;
}

[data-theme='light'] .glass-bg {
    opacity: 0.15;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 3rem;
    padding-left: 1rem;
}

.logo i {
    color: var(--accent);
    filter: drop-shadow(0 0 10px rgba(88, 101, 242, 0.5));
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    padding: 0.85rem 1.25rem;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-dim);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.nav-links li:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    transform: translateX(5px);
}

.nav-links li.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.nav-links li i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Content Area */
.content {
    flex: 1;
    padding: 3rem 4rem;
    overflow-y: auto;
    position: relative;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

/* Cards */
.card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-radius: 30px; 
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--card-shadow);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}
.card h2, .card h3 {
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-row span {
    color: var(--text-dim);
    font-weight: 500;
}

/* Sidebar Navigation */
.nav-links li {
    padding: 1rem 1.5rem;
    border-radius: 20px; /* 더 둥글게 */
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

/* Inputs & Forms */
input[type="text"], input[type="number"], select {
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.85rem 1.5rem;
    border-radius: 20px; /* 입력창 모서리 둥글게 */
    outline: none;
    transition: 0.3s;
    width: 240px;
    font-weight: 500;
    appearance: none; /* 기본 화살표 제거 가능 */
}

/* Dropdown styling */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 3rem;
}

[data-theme='light'] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23252525' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

input:focus, select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.15);
}

/* Custom Select options */
select option {
    background: var(--panel);
    color: var(--text);
    padding: 10px;
}

/* Switches */
.switch {
    width: 50px;
    height: 26px;
    background: #3f4152;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: 0.4s;
}

.switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: 0.4s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch.on {
    background: var(--accent);
}

.switch.on::after {
    left: 27px;
}

/* Buttons */
.save-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.save-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

/* Tables */
table {
    width: 100%;
    border-spacing: 0 8px;
}

table th {
    color: var(--text-dim);
    text-align: left;
    padding: 0 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
}

table tr td {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.2rem 1rem;
}

table tr td:first-child { border-radius: 12px 0 0 12px; }
table tr td:last-child { border-radius: 0 12px 12px 0; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
