:root {
    /* Color Palette - Premium Modern */
    --bg-main: #f5f7fa;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;

    --primary-color: #4f46e5;
    --primary-hover: #4338ca;

    --status-waiting: #f59e0b;
    --status-waiting-bg: #fef3c7;

    --status-completed: #10b981;
    --status-completed-bg: #d1fae5;

    --status-cancelled: #ef4444;
    --status-cancelled-bg: #fee2e2;

    --border-color: #e2e8f0;
    --input-bg: #f8fafc;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Radii */
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Transitions */
    --trans-fast: 0.15s ease-in-out;
    --trans-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 460px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    margin-bottom: 0;
}

.sidebar-header h1 {
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    color: var(--text-secondary);
    font-size: 1.15rem;
}

/* Form Styles */
#waiting-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 1.1rem 1.25rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--trans-fast);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Phone input wrapper */
.phone-input-wrapper {
    display: flex;
    align-items: stretch;
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 1.1rem 1.25rem;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.phone-input-wrapper input {
    flex: 1;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all var(--trans-normal);
}

.btn-submit:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--trans-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-outline-primary:hover {
    background-color: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

.btn-outline-danger {
    background-color: transparent;
    border: 1px solid var(--status-cancelled);
    color: var(--status-cancelled);
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--trans-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.btn-outline-danger:hover {
    background-color: var(--status-cancelled-bg);
    color: var(--status-cancelled);
}

/* Admin Dashboard Cards */
.dashboard-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0;
    border-top: 1px dashed var(--border-color);
    padding-top: 1.5rem;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--trans-fast);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.stat-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.waiting {
    color: var(--status-waiting);
}

.stat-value.completed {
    color: var(--status-completed);
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 3rem;
    background-color: var(--bg-main);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.main-header h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Tabs */
.tabs-container {
    display: flex;
    background-color: var(--bg-card);
    padding: 0.375rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.625rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--trans-fast);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.tab-btn:hover:not(.active) {
    background-color: var(--input-bg);
    color: var(--text-primary);
}

/* List Container */
.list-container {
    background-color: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list-headers {
    display: flex;
    align-items: center;
    padding: 1.25rem 2rem;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.col-num {
    width: 60px;
    flex-shrink: 0;
}

.col-info {
    flex: 1;
    min-width: 200px;
}

.col-time {
    width: 120px;
    color: var(--text-tertiary);
    font-size: 1.05rem;
}

.col-status {
    width: 120px;
}

.col-actions {
    width: 240px;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.list-content {
    flex: 1;
    overflow-y: auto;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-tertiary);
    text-align: center;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* List Items */
.list-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--trans-fast);
    background-color: white;
}

.list-item:hover {
    background-color: #f8fafc;
}

.list-item.is-entering {
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid var(--border-color);
}

.info-name-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.info-name {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.info-count {
    font-size: 0.95rem;
    background-color: var(--bg-main);
    padding: 0.1rem 0.5rem;
    border-radius: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.info-phone-group {
    display: flex;
    align-items: center;
}

.info-phone {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.btn-copy-phone,
.btn-call-phone {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.35rem;
    margin-left: 0.1rem;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--trans-fast);
}

.btn-copy-phone:hover,
.btn-call-phone:hover {
    color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.1);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.status-badge.waiting {
    background-color: var(--status-waiting-bg);
    color: var(--status-waiting);
}

.status-badge.completed {
    background-color: var(--status-completed-bg);
    color: var(--status-completed);
}

.status-badge.cancelled {
    background-color: var(--status-cancelled-bg);
    color: var(--status-cancelled);
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--trans-fast);
}

.btn-action svg {
    width: 16px;
    height: 16px;
}

.btn-call {
    background-color: var(--primary-color);
    color: white;
}

.btn-call:hover {
    background-color: var(--primary-hover);
}

.btn-complete {
    background-color: white;
    border-color: var(--status-completed);
    color: var(--status-completed);
}

.btn-complete:hover {
    background-color: var(--status-completed);
    color: white;
}

.btn-cancel {
    background-color: white;
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.btn-cancel:hover {
    background-color: var(--status-cancelled-bg);
    border-color: var(--status-cancelled);
    color: var(--status-cancelled);
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 50;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    transform: translateY(100%);
    opacity: 0;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.success {
    border-left: 4px solid var(--status-completed);
}

.toast.error {
    border-left: 4px solid var(--status-cancelled);
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}

.toast.fade-out {
    animation: toastOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastOut {
    to {
        transform: translateY(10px);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }

    .dashboard-cards {
        flex-direction: row;
        justify-content: space-between;
    }

    .card {
        flex: 1;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        flex-direction: column;
    }

    .main-content {
        padding: 1.5rem;
    }

    .col-time {
        display: none;
    }

    .col-info {
        min-width: 150px;
    }
}