*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{
    font-family:"Pretendard","Noto Sans KR",sans-serif;
    background:#f3f4f6;
    color:#111827;
}

.wrapper{
    min-height:100vh;
    padding-top:74px;
}

.top-fixed-menu{
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:3000;
    min-height:74px;
    display:flex;
    align-items:center;
    gap:18px;
    padding:10px 20px;
    background:#111827;
    color:white;
    box-shadow:0 4px 20px rgba(0,0,0,.18);
}

.sidebar-logo{
    min-width:160px;
    cursor:pointer;
}

.sidebar-title{
    font-size:20px;
    font-weight:900;
}

.sidebar-subtitle{
    font-size:12px;
    color:#9ca3af;
    margin-top:3px;
}

.sidebar-menu{
    flex:1;
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
}

.sidebar-menu a{
    display:flex;
    align-items:center;
    gap:6px;
    color:#e5e7eb;
    text-decoration:none;
    padding:10px 11px;
    border-radius:10px;
    font-size:14px;
    font-weight:800;
    white-space:nowrap;
}

.sidebar-menu a:hover,
.sidebar-menu a.active{
    background:#2563eb;
    color:white;
}

.main{
    width:100%;
    min-width:0;
}

.topbar{
    display:none;
}

.content{
    padding:20px 24px;
}

.page-title{
    display:none;
}

.card{
    background:white;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:22px;
    margin-bottom:18px;
    box-shadow:0 4px 18px rgba(0,0,0,.04);
}

.grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.grid-3{
    display:grid;
    grid-template-columns:1fr 1fr 1fr;
    gap:18px;
}

.form-group{
    margin-bottom:18px;
}

.label{
    display:block;
    font-size:14px;
    font-weight:700;
    margin-bottom:8px;
    color:#374151;
}

.input,
.select,
.textarea{
    width:100%;
    border:1px solid #d1d5db;
    border-radius:12px;
    padding:13px 14px;
    font-size:14px;
    background:white;
}

.input:focus,
.select:focus,
.textarea:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 4px rgba(37,99,235,.1);
}

.textarea{
    min-height:110px;
    resize:vertical;
}

.btn{
    border:none;
    border-radius:12px;
    padding:12px 18px;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    gap:6px;
}

.btn-primary{background:#2563eb;color:white;}
.btn-primary:hover{background:#1d4ed8;}

.btn-success{background:#10b981;color:white;}
.btn-success:hover{background:#059669;}

.btn-danger{background:#ef4444;color:white;}
.btn-danger:hover{background:#dc2626;}

.kpi-grid,
.summary-row{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:12px;
    margin-bottom:16px;
}

.kpi-card,
.summary-card,
.summary-mini{
    background:white;
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:14px;
    box-shadow:0 4px 18px rgba(0,0,0,.035);
}

.kpi-title,
.summary-label,
.summary-mini-label{
    font-size:12px;
    color:#6b7280;
    font-weight:800;
    margin-bottom:5px;
}

.kpi-value,
.summary-value,
.summary-mini-value{
    font-size:22px;
    font-weight:900;
}

.table-wrapper{
    overflow-x:auto;
}

.table{
    width:100%;
    border-collapse:collapse;
}

.table th{
    background:#f9fafb;
    padding:13px;
    font-size:13px;
    font-weight:900;
    text-align:left;
    border-bottom:1px solid #e5e7eb;
    white-space:nowrap;
}

.table td{
    padding:13px;
    border-bottom:1px solid #f1f5f9;
    font-size:14px;
    vertical-align:middle;
}

.table tr:hover{
    background:#f9fafb;
}

.status{
    display:inline-flex;
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    color:white;
}

.status.pending{background:#f59e0b;}
.status.win{background:#10b981;}
.status.lose{background:#ef4444;}

.toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:14px;
}

.filter-area{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.filter-area .input,
.filter-area .select{
    max-width:220px;
}

.action-buttons{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

.badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:5px 9px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
}

.badge-daily{background:#fef3c7;color:#92400e;}
.badge-regular{background:#dcfce7;color:#166534;}
.badge-active{background:#dbeafe;color:#1d4ed8;}
.badge-stop{background:#fee2e2;color:#991b1b;}

.progress-wrap{
    min-width:150px;
}

.progress-text{
    font-size:13px;
    font-weight:900;
    margin-bottom:5px;
}

.progress-bar{
    width:100%;
    height:9px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
}

.progress-fill{
    height:100%;
    background:#2563eb;
    border-radius:999px;
}

.panel-backdrop{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.45);
    backdrop-filter:blur(3px);
    z-index:9000;
}

.panel-backdrop.open{
    display:block;
}

.slide-panel{
    position:fixed;
    top:0;
    right:-720px;
    width:720px;
    max-width:100%;
    height:100vh;
    background:#f9fafb;
    z-index:9100;
    box-shadow:-20px 0 50px rgba(0,0,0,.22);
    transition:right .28s ease;
    display:flex;
    flex-direction:column;
}

.slide-panel.open{
    right:0;
}

.panel-header{
    background:#111827;
    color:white;
    padding:20px 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
}

.panel-title{
    font-size:22px;
    font-weight:900;
}

.panel-subtitle{
    font-size:13px;
    color:#cbd5e1;
    margin-top:4px;
}

.panel-close{
    border:none;
    background:#374151;
    color:white;
    width:38px;
    height:38px;
    border-radius:10px;
    font-size:22px;
    cursor:pointer;
}

.panel-body{
    flex:1;
    overflow:auto;
    padding:20px;
}

.panel-section{
    background:white;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:20px;
    margin-bottom:16px;
    box-shadow:0 4px 18px rgba(0,0,0,.04);
}

.panel-section-title{
    font-size:17px;
    font-weight:900;
    margin-bottom:16px;
}

.panel-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.panel-footer{
    background:white;
    border-top:1px solid #e5e7eb;
    padding:16px 20px;
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

/* 데스크탑 우선, 모바일은 추후 별도 정리 */
@media(max-width:1024px){
    .top-fixed-menu{
        position:static;
        flex-direction:column;
        align-items:flex-start;
    }

    .wrapper{
        padding-top:0;
    }

    .sidebar-menu{
        width:100%;
    }

    .kpi-grid,
    .summary-row{
        grid-template-columns:1fr 1fr;
    }

    .grid-2,
    .grid-3{
        grid-template-columns:1fr;
    }
}

.sidebar a.active,
.sidebar .menu-link.active,
.sidebar .nav-link.active{
    background:#2563eb !important;
    color:#ffffff !important;
    font-weight:900;
}

.sidebar a.active *,
.sidebar .menu-link.active *,
.sidebar .nav-link.active *{
    color:#ffffff !important;
}

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #f4f6f9;
}

.main-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  box-sizing: border-box;
}

.dashboard-page {
  padding: 24px;
  box-sizing: border-box;
}

.dashboard-header {
  margin-bottom: 20px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 28px;
  color: #111827;
}

.dashboard-header p {
  margin: 6px 0 0;
  color: #6b7280;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card,
.dash-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}

.stat-card span {
  display: block;
  color: #6b7280;
  font-size: 14px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  color: #111827;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.dash-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: #111827;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title-row span {
  color: #6b7280;
  font-size: 13px;
}

.recent-list,
.mini-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recent-item,
.mini-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-sizing: border-box;
}

.recent-item:hover,
.mini-item:hover {
  background: #f9fafb;
}

.recent-item strong,
.mini-item strong {
  display: block;
  font-size: 15px;
  color: #111827;
}

.recent-item p {
  margin: 5px 0 0;
  font-size: 13px;
  color: #6b7280;
}

.recent-item span,
.mini-item span {
  flex: 0 0 auto;
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}

.empty-box {
  padding: 22px;
  border-radius: 14px;
  background: #f9fafb;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
}

.empty-box.error {
  color: #b91c1c;
  background: #fef2f2;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
}

.pager button {
  border: 0;
  border-radius: 10px;
  padding: 9px 14px;
  background: #111827;
  color: #fff;
  cursor: pointer;
}

.pager button:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.pager span {
  font-size: 14px;
  color: #4b5563;
}

@media (max-width: 1100px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-wrap {
    width: 100%;
    margin-left: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .dashboard-page {
    padding: 16px;
  }

  .dashboard-header h1 {
    font-size: 24px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card,
  .dash-card {
    border-radius: 15px;
    padding: 15px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .recent-item,
  .mini-item {
    flex-direction: column;
  }

  .recent-item span,
  .mini-item span {
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .dashboard-page {
    padding: 12px;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }
}