/* ==========================================================
   GS INVENTORI - MODERN CLAYMORPHISM THEME
   Pure CSS skin; preserves existing PHP, JS, Bootstrap,
   AdminLTE, form actions, tables and database operations.
   ========================================================== */
:root {
  --clay-bg: #f3f1f8;
  --clay-surface: #fbfaff;
  --clay-surface-2: #f0eef8;
  --clay-lilac: #dcd6f4;
  --clay-blue: #d9e9f8;
  --clay-pink: #f6e1eb;
  --clay-mint: #dcefe8;
  --clay-ink: #34334a;
  --clay-muted: #85849b;
  --clay-accent: #8175c9;
  --clay-accent-dark: #6e62b5;
  --clay-line: #e7e4f0;
  --clay-shadow: 8px 8px 18px rgba(105, 99, 139, .12), -7px -7px 18px rgba(255,255,255,.92);
  --clay-shadow-small: 4px 4px 10px rgba(105, 99, 139, .11), -4px -4px 10px rgba(255,255,255,.92);
  --clay-inset: inset 3px 3px 7px rgba(105, 99, 139, .10), inset -3px -3px 7px rgba(255,255,255,.9);
}

body.clay-theme,
body.login-page {
  background: var(--clay-bg) !important;
  color: var(--clay-ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.clay-theme a { color: #7569bb; }
body.clay-theme a:hover, body.clay-theme a:focus { color: #5f54a4; }
body.clay-theme .wrapper { background: var(--clay-bg); }

/* Header */
body.clay-theme .main-header { background: transparent; }
body.clay-theme .main-header .logo {
  background: #e8e4f6 !important;
  color: #514a7d !important;
  border: 0;
  font-weight: 700;
  box-shadow: 3px 3px 9px rgba(105,99,139,.10), -3px -3px 9px rgba(255,255,255,.85);
}
body.clay-theme .main-header .navbar {
  background: #e8e4f6 !important;
  border: 0 !important;
  box-shadow: 0 5px 16px rgba(105,99,139,.10);
}
body.clay-theme .main-header .navbar .sidebar-toggle,
body.clay-theme .main-header .navbar .nav > li > a { color: #5c567e !important; }
body.clay-theme .main-header .navbar .sidebar-toggle:hover,
body.clay-theme .main-header .navbar .nav > li > a:hover { background: rgba(255,255,255,.48) !important; }
body.clay-theme .main-header .navbar-custom-menu .dropdown-menu {
  border: 1px solid var(--clay-line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--clay-shadow);
}
body.clay-theme .user-header { background: #dcd6f4 !important; color: #514a7d !important; }

/* Sidebar */
body.clay-theme .main-sidebar {
  background: #eae7f5 !important;
  box-shadow: 7px 0 20px rgba(105,99,139,.08);
}
body.clay-theme .sidebar { background: transparent; }
body.clay-theme .user-panel { border-bottom: 1px solid rgba(126,116,177,.14) !important; }
body.clay-theme .user-panel > .info,
body.clay-theme .user-panel > .info > a { color: #625d7e !important; }
body.clay-theme .sidebar-menu > li > a {
  margin: 4px 10px;
  padding: 12px 13px;
  border-radius: 13px;
  color: #66617f !important;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
body.clay-theme .sidebar-menu > li > a:hover {
  background: #f2f0fa !important;
  box-shadow: var(--clay-shadow-small);
  transform: translateX(2px);
}
body.clay-theme .sidebar-menu > li.active > a,
body.clay-theme .sidebar-menu > li.menu-open > a {
  background: #dcd6f4 !important;
  color: #514a7d !important;
  box-shadow: var(--clay-inset);
  border-left: 0 !important;
}
body.clay-theme .sidebar-menu .treeview-menu { background: rgba(255,255,255,.28) !important; border-radius: 12px; margin: 2px 10px 8px 18px; padding: 5px; }
body.clay-theme .sidebar-menu .treeview-menu > li > a { color: #77718e !important; border-radius: 9px; padding: 9px 10px 9px 16px; }
body.clay-theme .sidebar-menu .treeview-menu > li > a:hover { background: rgba(255,255,255,.65) !important; color: #554d86 !important; }
body.clay-theme .sidebar-menu .text-online { color: #71b99b !important; }

/* Main canvas and page headings */
body.clay-theme .content-wrapper,
body.clay-theme .right-side { background: var(--clay-bg) !important; }
body.clay-theme .content { padding: 18px 20px 28px; }
body.clay-theme .content-header { padding: 20px 20px 5px; }
body.clay-theme .content-header > h1,
body.clay-theme .content-header > h1 > small { color: var(--clay-ink); }
body.clay-theme .breadcrumb {
  background: #eeecf6;
  border-radius: 12px;
  padding: 10px 15px;
  box-shadow: var(--clay-inset);
}
body.clay-theme .breadcrumb > li + li:before { color: #aaa5c0; }

/* Clay surfaces */
body.clay-theme .box,
body.clay-theme .small-box,
body.clay-theme .info-box,
body.clay-theme .callout,
body.clay-theme .nav-tabs-custom,
body.clay-theme .thumbnail,
body.clay-theme .panel,
body.clay-theme .well,
body.clay-theme .direct-chat,
body.clay-theme .mailbox-controls,
body.clay-theme .box.box-solid {
  border: 1px solid rgba(255,255,255,.85) !important;
  border-radius: 18px !important;
  background: var(--clay-surface) !important;
  box-shadow: var(--clay-shadow) !important;
  overflow: hidden;
}
body.clay-theme .box { margin-bottom: 22px; }
body.clay-theme .box-header { padding: 16px 18px; color: #55516f; border-bottom: 1px solid var(--clay-line); }
body.clay-theme .box-title { font-weight: 650; }
body.clay-theme .box-body { padding: 18px; }
body.clay-theme .box-footer { background: #f6f4fb; border-top: 1px solid var(--clay-line); padding: 14px 18px; }
body.clay-theme .box-primary, body.clay-theme .box-info, body.clay-theme .box-success,
body.clay-theme .box-warning, body.clay-theme .box-danger { border-top: 0 !important; }
body.clay-theme .box-header.with-border { border-bottom: 1px solid var(--clay-line); }
body.clay-theme .small-box { color: #514d69 !important; min-height: 120px; }
body.clay-theme .small-box > .inner { padding: 20px; }
body.clay-theme .small-box h3 { font-weight: 750; color: #4f4a6a; }
body.clay-theme .small-box p { color: #77728f; }
body.clay-theme .small-box .icon { color: rgba(95,86,148,.18) !important; }
body.clay-theme .small-box-footer { background: rgba(255,255,255,.35) !important; color: #625a96 !important; }
body.clay-theme .info-box { min-height: 90px; }
body.clay-theme .info-box-icon { border-radius: 14px; margin: 10px; width: 64px; height: 64px; line-height: 64px; box-shadow: var(--clay-shadow-small); }
body.clay-theme .info-box-content { padding: 14px 10px; }
body.clay-theme .info-box-text { color: #89849f; }
body.clay-theme .info-box-number { color: #4e4969; }

/* Pastel semantic surfaces */
body.clay-theme .small-box.bg-aqua, body.clay-theme .info-box-icon.bg-aqua { background: var(--clay-blue) !important; }
body.clay-theme .small-box.bg-green, body.clay-theme .info-box-icon.bg-green { background: var(--clay-mint) !important; }
body.clay-theme .small-box.bg-yellow, body.clay-theme .info-box-icon.bg-yellow { background: #f8edcf !important; }
body.clay-theme .small-box.bg-red, body.clay-theme .info-box-icon.bg-red { background: var(--clay-pink) !important; }
body.clay-theme .small-box.bg-purple, body.clay-theme .info-box-icon.bg-purple { background: var(--clay-lilac) !important; }
body.clay-theme .bg-aqua, body.clay-theme .bg-green, body.clay-theme .bg-yellow,
body.clay-theme .bg-red, body.clay-theme .bg-purple { color: #514d69 !important; }

/* Buttons */
body.clay-theme .btn {
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 11px;
  padding: 7px 13px;
  font-weight: 600;
  box-shadow: var(--clay-shadow-small);
  transition: transform .16s ease, box-shadow .16s ease;
}
body.clay-theme .btn:hover { transform: translateY(-1px); box-shadow: 5px 5px 12px rgba(105,99,139,.13), -4px -4px 10px rgba(255,255,255,.95); }
body.clay-theme .btn:active { transform: translateY(1px); box-shadow: var(--clay-inset); }
body.clay-theme .btn-primary, body.clay-theme .btn-info { background: #dcd6f4 !important; color: #514a7d !important; border-color: #e8e3fb !important; }
body.clay-theme .btn-success { background: #dcefe8 !important; color: #477866 !important; border-color: #e9f8f1 !important; }
body.clay-theme .btn-warning { background: #f8edcf !important; color: #88713c !important; border-color: #fff7df !important; }
body.clay-theme .btn-danger { background: #f6e1eb !important; color: #985d78 !important; border-color: #fff0f6 !important; }
body.clay-theme .btn-default { background: #f3f1f8 !important; color: #66617f !important; border-color: #fff !important; }
body.clay-theme .btn-flat { border-radius: 11px !important; }

/* Forms */
body.clay-theme .form-control,
body.clay-theme select.form-control,
body.clay-theme textarea.form-control,
body.clay-theme .select2-container--default .select2-selection--single,
body.clay-theme .select2-container--default .select2-selection--multiple {
  background: #f4f2fa;
  border: 1px solid #e8e4f1;
  border-radius: 11px;
  color: #4f4b68;
  box-shadow: var(--clay-inset);
  min-height: 38px;
}
body.clay-theme .form-control:focus { border-color: #b8afe8; box-shadow: inset 2px 2px 5px rgba(105,99,139,.08), 0 0 0 3px rgba(166,155,224,.18); }
body.clay-theme label { color: #66617f; font-weight: 600; }
body.clay-theme .input-group-addon { background: #eae7f5; border-color: #e4e0ef; color: #77718e; border-radius: 10px; }
body.clay-theme .help-block { color: var(--clay-muted); }

/* Tables and pagination */
body.clay-theme .table { color: #55516f; }
body.clay-theme .table > thead > tr > th { background: #eeebf7; color: #5e587d; border-bottom: 1px solid #e4e0ef; font-weight: 700; }
body.clay-theme .table > tbody > tr > td,
body.clay-theme .table > tbody > tr > th { border-top: 1px solid #eeebf5; vertical-align: middle; }
body.clay-theme .table-striped > tbody > tr:nth-of-type(odd) { background: #faf9fd; }
body.clay-theme .table-hover > tbody > tr:hover { background: #f0eef9; }
body.clay-theme .dataTables_wrapper .dataTables_filter input,
body.clay-theme .dataTables_wrapper .dataTables_length select { border: 1px solid #e5e1ef; border-radius: 9px; padding: 5px 8px; background: #f5f3fa; }
body.clay-theme .pagination > li > a,
body.clay-theme .pagination > li > span { border: 0; border-radius: 8px !important; margin: 2px; background: #f3f1f8; color: #6e65a9; box-shadow: var(--clay-shadow-small); }
body.clay-theme .pagination > .active > a,
body.clay-theme .pagination > .active > span { background: #dcd6f4; color: #514a7d; }

/* Alerts, tabs, modal and labels */
body.clay-theme .alert { border: 0; border-radius: 13px; box-shadow: var(--clay-shadow-small); }
body.clay-theme .alert-success { background: #e2f2eb; color: #4e7968; }
body.clay-theme .alert-danger { background: #f8e6ed; color: #985d78; }
body.clay-theme .alert-warning { background: #fbf1d9; color: #8b7544; }
body.clay-theme .alert-info { background: #e4eff9; color: #5c7794; }
body.clay-theme .nav-tabs-custom { padding: 8px; }
body.clay-theme .nav-tabs-custom > .nav-tabs > li.active { border-top-color: #a79cde; }
body.clay-theme .nav-tabs-custom > .nav-tabs > li.active > a { background: #f5f3fb; color: #5d548f; }
body.clay-theme .modal-content { border: 1px solid #fff; border-radius: 18px; box-shadow: 12px 12px 28px rgba(75,68,110,.2); overflow: hidden; }
body.clay-theme .modal-header { background: #eeebf7; border-bottom: 1px solid var(--clay-line); }
body.clay-theme .modal-footer { background: #f8f7fc; border-top: 1px solid var(--clay-line); }
body.clay-theme .label { border-radius: 7px; padding: 4px 7px; }
body.clay-theme .main-footer { background: #eeebf6; border-top: 1px solid #e5e1ef; color: #85809a; padding: 16px 20px; }

/* Login screen */
body.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 12px; }
body.login-page .container { width: 100%; }
body.login-page #loginbox { float: none; margin: 0 auto !important; }
body.login-page .login-box, body.login-page .mainbox,
body.login-page #loginbox > .panel, body.login-page #loginbox > div {
  border-radius: 22px;
}
body.login-page #loginbox .panel,
body.login-page #loginbox .box,
body.login-page #loginbox .well {
  background: var(--clay-surface) !important;
  border: 1px solid #fff !important;
  border-radius: 22px !important;
  box-shadow: 10px 10px 24px rgba(105,99,139,.13), -8px -8px 22px rgba(255,255,255,.95) !important;
  overflow: hidden;
}
body.login-page #loginbox .panel-heading { background: #e8e4f6 !important; color: #514a7d; border: 0; padding: 18px; }
body.login-page #loginbox .panel-body { padding: 24px; }

/* Small screen refinements */
@media (max-width: 767px) {
  body.clay-theme .content { padding: 12px 10px 22px; }
  body.clay-theme .content-header { padding: 14px 12px 4px; }
  body.clay-theme .box-body { padding: 12px; }
  body.clay-theme .box-header { padding: 13px 14px; }
  body.clay-theme .main-sidebar { box-shadow: 4px 0 15px rgba(105,99,139,.12); }
  body.clay-theme .table-responsive { border: 0; }
  body.clay-theme .small-box { margin-bottom: 16px; }
  body.login-page #loginbox { width: 100%; padding: 0 10px; }
}
body.login-page .login-box { width: 100%; max-width: 430px; margin: 0 auto; }
body.login-page .login-logo a { color: #514a7d; font-weight: 700; }
body.login-page .login-box-body {
  background: var(--clay-surface) !important;
  color: var(--clay-ink);
  border: 1px solid #fff;
  border-radius: 22px;
  padding: 26px;
  box-shadow: 10px 10px 24px rgba(105,99,139,.13), -8px -8px 22px rgba(255,255,255,.95);
}
body.login-page .login-box-msg { color: var(--clay-muted); padding: 12px 0 0; }
body.login-page .login-box .form-control { background: #f4f2fa; border: 1px solid #e8e4f1; border-radius: 11px; box-shadow: var(--clay-inset); }
body.login-page .login-box .btn { background: #dcd6f4 !important; color: #514a7d !important; border: 1px solid #e8e3fb !important; }


/* Sidebar Clay: selalu mengisi tinggi viewport pada desktop */
@media (min-width: 768px) {
  html, body.clay-theme {
    min-height: 100vh !important;
  }

  body.clay-theme .wrapper {
    min-height: 100vh !important;
    position: relative;
  }

  body.clay-theme .main-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto;
    background: #eae7f5 !important;
  }
}


/* Sidebar Clay: pastikan panel mengisi seluruh viewport pada perangkat mobile */
@media (max-width: 767px) {
  html,
  body.clay-theme,
  body.clay-theme .wrapper {
    min-height: 100% !important;
  }

  /* AdminLTE 2 menggeser sidebar pada mobile; posisi fixed menjaga panel
     tetap menutup tinggi layar ketika sidebar dibuka. */
  body.clay-theme .main-sidebar,
  body.clay-theme.sidebar-open .main-sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background: #eae7f5 !important;
    z-index: 810 !important;
  }

  body.clay-theme .main-sidebar > .sidebar {
    min-height: 100% !important;
    height: auto !important;
    padding-bottom: 24px;
    background: #eae7f5 !important;
  }

  body.clay-theme .main-sidebar::before {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 230px;
    background: #eae7f5;
    z-index: -1;
    pointer-events: none;
  }
}
