/* Reset & base */
body{margin:0;background:#FAFAF8;font-family:'Inter',Arial,sans-serif;}
*{box-sizing:border-box;}
a{color:#383838;text-decoration:none;}
button{font-family:inherit;}
::selection{background:#FFDE3B;color:#202024;}
.hidden{display:none !important;}

/* Motion */
@keyframes fadeUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@keyframes growBar{from{transform:scaleY(0)}to{transform:scaleY(1)}}
.adm-page{animation:fadeUp .35s ease both;}
.adm-bar{transform-origin:bottom;animation:growBar .6s cubic-bezier(.22,1,.36,1) both;}

/* Layout */
.adm-layout{display:flex;min-height:100vh;background:#FAFAF8;}
.adm-main{flex:1;min-width:0;display:flex;flex-direction:column;}
.adm-content{flex:1;padding:28px 32px;}

/* Sidebar */
.adm-sidebar{width:248px;flex-shrink:0;background:#FFFFFF;border-right:1px solid #ECEAE3;display:flex;flex-direction:column;padding:22px 16px;position:sticky;top:0;height:100vh;}
.adm-logo{display:flex;align-items:center;gap:10px;padding:4px 8px 22px;}
.adm-logo-mark{width:34px;height:34px;border-radius:8px;background:#FFDE3B;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:15px;color:#202024;}
.adm-logo-title{font-weight:700;font-size:15px;color:#202024;letter-spacing:-0.01em;line-height:1.1;}
.adm-logo-sub{font-size:10px;font-weight:700;color:#B78A16;letter-spacing:0.06em;text-transform:uppercase;margin-top:2px;}
.adm-nav-label{font-size:11px;font-weight:700;color:#B7B4AA;text-transform:uppercase;letter-spacing:0.05em;padding:16px 12px 6px;}
.adm-nav-label:first-of-type{padding-top:8px;}
.adm-nav-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:transparent;border:none;border-radius:11px;padding:10px 12px;font-size:14px;font-weight:600;color:#6B6B6B;cursor:pointer;transition:background .15s ease,color .15s ease;}
.adm-nav-item:hover{background:#FAF9F6;color:#202024;}
.adm-nav-item.active{background:#FBF4DE;color:#202024;box-shadow:inset 3px 0 0 #FFDE3B;}
.adm-nav-item .icon{stroke:currentColor;flex-shrink:0;}
.adm-nav-count{margin-left:auto;background:#FFDE3B;color:#202024;font-size:11px;font-weight:800;border-radius:100px;padding:2px 7px;}
.adm-sidebar-user{margin-top:auto;padding-top:16px;border-top:1px solid #ECEAE3;display:flex;align-items:center;gap:10px;padding-left:8px;}
.adm-sidebar-user-info{min-width:0;}
.adm-sidebar-user-name{font-size:13px;font-weight:700;color:#202024;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.adm-sidebar-user-role{font-size:11px;color:#8A8A8A;}

/* Topbar */
.adm-topbar{height:76px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 32px;border-bottom:1px solid #ECEAE3;background:#FFFFFF;}
.adm-topbar-title{font-size:21px;font-weight:800;color:#202024;letter-spacing:-0.01em;}
.adm-topbar-subtitle{font-size:13px;color:#8A8A8A;margin-top:2px;}
.adm-topbar-right{display:flex;align-items:center;gap:12px;}
.adm-notif-dot{position:absolute;top:7px;right:7px;width:7px;height:7px;border-radius:50%;background:#FF6B6B;border:1.5px solid #FFFFFF;}
.adm-user-chip{display:flex;align-items:center;gap:8px;padding-left:10px;border-left:1px solid #ECEAE3;}
.adm-muted-icon{stroke:#8A8A8A;}

/* Icon */
.icon{display:block;flex-shrink:0;}

/* Cards */
.adm-card{background:#FFFFFF;border:1px solid #ECEAE3;border-radius:14px;}
.adm-card-header{display:flex;align-items:center;justify-content:space-between;}
.adm-card-title{font-size:16px;font-weight:700;color:#202024;}
.adm-muted-text{font-size:13px;color:#8A8A8A;}
.adm-link{font-size:13px;font-weight:700;color:#B78A16;}

/* Search / filter / buttons */
.adm-search{display:flex;align-items:center;gap:8px;background:#FFFFFF;border:1px solid #ECEAE3;border-radius:9px;padding:10px 14px;width:280px;}
.adm-search .icon{stroke:#9A9A9A;}
.adm-search-muted{background:#FAF9F6;}
.adm-search-placeholder{font-size:13px;color:#ABABAB;}
.adm-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;}
.adm-toolbar-actions{display:flex;gap:10px;}
.adm-icon-btn{position:relative;width:38px;height:38px;border-radius:12px;border:1px solid #ECEAE3;background:#FFFFFF;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#6B6B6B;}
.adm-icon-btn:hover{background:#FAF9F6;color:#202024;}
.adm-icon-btn .icon{stroke:currentColor;}
.adm-icon-btn.sm{width:32px;height:32px;}
.adm-btn-primary{background:#FFDE3B;border:none;border-radius:12px;font-size:14px;font-weight:700;color:#202024;padding:10px 18px;cursor:pointer;display:inline-flex;align-items:center;gap:8px;}
.adm-btn-primary:hover{background:#F4CE1A;}
.adm-btn-primary .icon{stroke:#202024;}
.adm-filter-btn{background:#FFFFFF;border:1px solid #ECEAE3;border-radius:12px;font-size:14px;font-weight:600;color:#4B4B4B;padding:10px 16px;cursor:pointer;display:inline-flex;align-items:center;gap:8px;}
.adm-filter-btn:hover{background:#FAF9F6;}

/* Tables */
.adm-table{width:100%;border-collapse:collapse;}
.adm-table th{text-transform:uppercase;font-size:11px;letter-spacing:0.04em;font-weight:700;color:#9A9A9A;text-align:left;padding:12px 20px;border-bottom:1px solid #ECEAE3;background:#FCFBF8;white-space:nowrap;}
.adm-table th:first-child{border-top-left-radius:14px;}
.adm-table th:last-child{border-top-right-radius:14px;}
.adm-table td{padding:14px 20px;border-bottom:1px solid #F1EFE9;font-size:14px;color:#3A3A3E;vertical-align:middle;}
.adm-table tbody tr{transition:background .12s ease;}
.adm-table tbody tr:hover td{background:#FCFBF6;}
.adm-table tbody tr:last-child td{border-bottom:none;}
.adm-pagination{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-top:1px solid #ECEAE3;}
.adm-pagination-actions{display:flex;gap:8px;}
.adm-cell-main{display:flex;align-items:center;gap:10px;}
.adm-cell-name{font-weight:700;color:#202024;}
.adm-cell-sub{font-size:12px;color:#8A8A8A;}
.adm-cell-strong{font-weight:700;color:#202024;}
.adm-cell-muted{color:#8A8A8A;}

/* Badges */
.adm-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:100px;font-size:12px;font-weight:700;white-space:nowrap;}
.adm-badge.green{background:#E4F8EE;color:#1E9E63;}
.adm-badge.amber{background:#FFF6D6;color:#8A6A10;}
.adm-badge.red{background:#FDEAEA;color:#C23B3B;}
.adm-badge.gray{background:#F1EFE9;color:#6B6B6B;}
.adm-badge.blue{background:#EAF1FF;color:#2E5FCC;}

/* Avatar */
.adm-avatar{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:#FFFFFF;flex-shrink:0;}
.adm-avatar.sm{width:32px;height:32px;font-size:11px;}

/* Dashboard */
.adm-metrics-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:24px;}
.adm-metric-card{padding:22px;}
.adm-metric-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.adm-metric-icon{width:44px;height:44px;border-radius:12px;background:#FFF6D6;display:flex;align-items:center;justify-content:center;}
.adm-metric-icon .icon{stroke:#B78A16;}
.adm-metric-value{font-size:26px;font-weight:800;color:#202024;letter-spacing:-0.01em;}
.adm-metric-label{font-size:13px;color:#8A8A8A;margin-top:4px;}
.adm-dashboard-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:18px;align-items:start;}
.adm-chart-card{padding:24px;}
.adm-chart-card .adm-card-header{margin-bottom:20px;}
.adm-chart{display:flex;align-items:flex-end;gap:16px;height:140px;}
.adm-chart-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;height:100%;justify-content:flex-end;}
.adm-chart-col-label{font-size:11px;color:#8A8A8A;font-weight:600;}
.adm-renewals{display:flex;flex-direction:column;gap:14px;}
.adm-renewal-row{display:flex;align-items:center;gap:10px;}
.adm-renewal-info{min-width:0;flex:1;}
.adm-renewal-client{font-size:13px;font-weight:700;color:#202024;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.adm-renewal-product{font-size:12px;color:#8A8A8A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.adm-recent-card{margin-top:18px;overflow:hidden;}

/* Roles grid */
.adm-roles-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;}
.adm-role-card{padding:22px;display:flex;flex-direction:column;gap:14px;}
.adm-role-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.adm-role-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.adm-role-icon .icon{stroke:#FFFFFF;}
.adm-role-name{font-size:16px;font-weight:700;color:#202024;}
.adm-role-desc{font-size:13px;color:#8A8A8A;line-height:1.5;}
.adm-role-perms{display:flex;flex-wrap:wrap;gap:6px;}
.adm-role-perm-chip{font-size:11px;font-weight:700;padding:3px 9px;border-radius:100px;background:#F1EFE9;color:#6B6B6B;}
.adm-role-perm-chip.manage{background:#E4F8EE;color:#1E9E63;}
.adm-role-perm-chip.view{background:#EAF1FF;color:#2E5FCC;}
.adm-role-footer{display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding-top:14px;border-top:1px solid #ECEAE3;}
.adm-role-usercount{font-size:12px;color:#8A8A8A;font-weight:600;}
.adm-role-actions{display:flex;gap:8px;}

/* Modals */
.adm-modal-overlay{position:fixed;inset:0;background:rgba(32,32,36,0.5);z-index:200;display:flex;align-items:center;justify-content:center;padding:24px;animation:fadeUp .15s ease both;}
.adm-modal{background:#FFFFFF;border-radius:16px;width:100%;max-width:420px;max-height:90vh;display:flex;flex-direction:column;box-shadow:0 30px 80px -20px rgba(0,0,0,0.4);}
.adm-modal-wide{max-width:560px;}
.adm-modal-header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #ECEAE3;flex-shrink:0;}
.adm-modal-title{font-size:17px;font-weight:700;color:#202024;}
.adm-modal-body{padding:20px 22px;overflow-y:auto;display:flex;flex-direction:column;gap:16px;}
.adm-modal-footer{display:flex;align-items:center;gap:10px;padding:16px 22px;border-top:1px solid #ECEAE3;flex-shrink:0;}
.adm-modal-spacer{flex:1;}
.adm-modal-error{font-size:13px;color:#C23B3B;background:#FDEAEA;border-radius:8px;padding:10px 12px;}
.adm-danger-text{color:#C23B3B;}
.adm-field{display:flex;flex-direction:column;gap:6px;}
.adm-label{font-size:12px;font-weight:700;color:#6B6B6B;text-transform:uppercase;letter-spacing:0.03em;}
.adm-input{padding:10px 12px;border-radius:9px;border:1px solid #E2DFD6;font-size:14px;font-family:inherit;color:#202024;background:#FFFFFF;outline:none;}
.adm-input:focus{border-color:#F4A631;}
select.adm-input{cursor:pointer;}
.adm-color-picker{display:flex;gap:8px;flex-wrap:wrap;}
.adm-color-swatch{width:28px;height:28px;border-radius:50%;cursor:pointer;border:2px solid transparent;}
.adm-color-swatch.selected{border-color:#202024;box-shadow:0 0 0 2px #FFFFFF inset;}
.adm-perm-table{width:100%;border-collapse:collapse;}
.adm-perm-table th{font-size:11px;font-weight:700;color:#9A9A9A;text-transform:uppercase;letter-spacing:0.03em;text-align:center;padding:6px 4px;}
.adm-perm-table th:first-child{text-align:left;}
.adm-perm-table td{padding:8px 4px;text-align:center;border-top:1px solid #F1EFE9;font-size:13px;}
.adm-perm-table td:first-child{text-align:left;font-weight:600;color:#3A3A3E;}
.adm-perm-radio{cursor:pointer;accent-color:#F4A631;width:16px;height:16px;}

/* View toggle */
.adm-view-toggle{display:flex;background:#F3F1EB;border-radius:9px;padding:3px;gap:2px;}
.adm-view-btn{display:flex;align-items:center;gap:6px;background:transparent;border:none;border-radius:9px;padding:7px 12px;font-size:13px;font-weight:600;color:#8A8A8A;cursor:pointer;}
.adm-view-btn .icon{stroke:currentColor;}
.adm-view-btn.active{background:#FFFFFF;color:#202024;box-shadow:0 1px 3px rgba(0,0,0,0.08);}

/* Kanban */
.adm-kanban{display:flex;gap:16px;align-items:start;overflow-x:auto;padding-bottom:10px;}
.adm-kanban-col{flex:0 0 268px;background:#FAFAF8;border:1px solid #ECEAE3;border-radius:14px;padding:14px;min-height:120px;transition:background .15s ease,border-color .15s ease;}
.adm-kanban-col.drag-over{background:#FBF4DE;border-color:#F4A631;}
.adm-kanban-col-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;padding:0 2px;}
.adm-kanban-col-title{font-size:13px;font-weight:700;color:#4B4B4B;text-transform:uppercase;letter-spacing:0.03em;}
.adm-kanban-col-count{font-size:12px;font-weight:700;color:#8A8A8A;background:#F1EFE9;border-radius:100px;padding:2px 8px;}
.adm-kanban-cards{display:flex;flex-direction:column;gap:10px;min-height:60px;}
.adm-kanban-card{background:#FFFFFF;border:1px solid #ECEAE3;border-radius:12px;padding:14px;cursor:grab;transition:box-shadow .15s ease,transform .15s ease,opacity .15s ease;}
.adm-kanban-card:hover{box-shadow:0 6px 16px -8px rgba(32,32,36,0.2);}
.adm-kanban-card.dragging{opacity:0.4;}
.adm-kanban-card-top{display:flex;align-items:center;gap:8px;margin-bottom:8px;}
.adm-kanban-card-company{font-size:13px;font-weight:700;color:#202024;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.adm-kanban-card-contact{font-size:12px;color:#8A8A8A;}
.adm-kanban-card-product{font-size:12px;color:#6B6B6B;margin-bottom:6px;}
.adm-kanban-card-date{font-size:11px;color:#ABABAB;}

/* Detail modal rows */
.adm-detail-row{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #F1EFE9;}
.adm-detail-row:last-child{border-bottom:none;}
.adm-detail-label{font-size:13px;color:#8A8A8A;flex-shrink:0;}
.adm-detail-value{font-size:13px;font-weight:600;color:#202024;text-align:right;}
.adm-flow-hint{background:#FAF9F6;border:1px solid #ECEAE3;border-radius:10px;padding:12px 14px;font-size:13px;color:#6B6B6B;line-height:1.5;}

/* Workspace switcher */
.adm-ws-switcher{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding-bottom:16px;margin-bottom:8px;border-bottom:1px solid #ECEAE3;}
.adm-ws-btn{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 2px;border-radius:11px;border:1px solid #ECEAE3;background:#FFFFFF;cursor:pointer;font-size:10px;font-weight:700;color:#8A8A8A;text-align:center;line-height:1.2;}
.adm-ws-btn .icon{stroke:currentColor;}
.adm-ws-btn:hover{background:#FAF9F6;}
.adm-ws-btn.active{background:#FBF4DE;border-color:#F4A631;color:#202024;}

/* Stage color picker (funnel settings) */
.adm-stage-color-swatch{cursor:pointer;width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;padding:0;font-size:12px;font-weight:800;border:2px solid transparent;}
.adm-stage-color-swatch.selected{border-color:#202024;}
