
:root {
    --bg: #070b14;
    --bg-soft: #0d1321;

    --panel: rgba(18, 26, 45, .88);
    --panel-soft: rgba(25, 35, 59, .76);

    --line: rgba(255,255,255,.075);

    --text: #f5f7ff;
    --muted: #97a4c0;

    --blue: #8292ff;
    --cyan: #55d4c3;
    --green: #5ee09b;
    --orange: #f2ad69;
    --pink: #e884cf;

    --shadow:
      0 22px 70px rgba(0,0,0,.27);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    color: var(--text);

    font-family:
      Inter,
      -apple-system,
      BlinkMacSystemFont,
      "Segoe UI",
      sans-serif;

    background:
      radial-gradient(
        circle at 8% -5%,
        rgba(99,115,255,.23),
        transparent 33%
      ),
      radial-gradient(
        circle at 100% 0%,
        rgba(47,211,187,.12),
        transparent 30%
      ),
      linear-gradient(
        145deg,
        #090e1a,
        #060910 70%
      );
}

header {
    position: sticky;
    top: 0;
    z-index: 50;

    padding: 19px 26px 17px;

    background:
      rgba(8,13,24,.79) !important;

    border-bottom:
      1px solid var(--line) !important;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    box-shadow:
      0 10px 36px rgba(0,0,0,.17);
}

header h1 {
    margin: 0;
    font-size: 23px !important;
    letter-spacing: -.45px;
}

header .sub {
    margin-top: 5px !important;

    color:
      var(--muted) !important;

    font-size: 12px !important;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 15px !important;
}

nav a {
    padding: 8px 14px !important;

    color: #dfe5ff !important;

    text-decoration: none;

    border:
      1px solid rgba(255,255,255,.07) !important;

    border-radius: 999px !important;

    background:
      rgba(255,255,255,.045) !important;

    transition:
      .18s ease !important;
}

nav a:hover {
    transform: translateY(-1px);

    border-color:
      rgba(130,146,255,.30) !important;

    background:
      rgba(130,146,255,.12) !important;
}

nav a.active {
    border-color:
      rgba(151,164,255,.40) !important;

    background:
      linear-gradient(
        135deg,
        rgba(116,132,255,.38),
        rgba(74,204,190,.18)
      ) !important;

    box-shadow:
      0 8px 28px rgba(84,102,225,.16);
}

main {
    width: min(1450px, 100%);
    margin: auto;
    padding: 27px !important;
}

main > h2 {
    margin-top: 0;
    font-size: 22px;
}

.grid {
    gap: 16px !important;
}

.card {
    padding: 18px !important;

    border:
      1px solid var(--line) !important;

    border-radius: 18px !important;

    background:
      linear-gradient(
        145deg,
        rgba(24,33,56,.91),
        rgba(14,21,38,.88)
      ) !important;

    box-shadow:
      var(--shadow) !important;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.grid > .card {
    transition:
      transform .18s ease,
      border-color .18s ease;
}

.grid > .card:hover {
    transform: translateY(-3px);

    border-color:
      rgba(132,147,255,.25) !important;
}

.small {
    color:
      var(--muted) !important;
}

.ok {
    color:
      var(--green) !important;

    font-weight: 700;
}

.off {
    color: #ff8093 !important;
    font-weight: 700;
}

a {
    color: #b3bdff;
}

button {
    border: 0;

    color: white;

    font-weight: 750;

    cursor: pointer;

    border-radius: 12px !important;

    background:
      linear-gradient(
        135deg,
        #7585f0,
        #557fd3
      ) !important;

    box-shadow:
      0 10px 28px rgba(77,98,217,.23);

    transition:
      transform .18s ease,
      filter .18s ease;
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

button:disabled {
    opacity: .55;
    cursor: wait;
    transform: none;
}

input,
textarea {
    outline: none;

    color: white !important;

    border:
      1px solid rgba(255,255,255,.10) !important;

    border-radius:
      13px !important;

    background:
      rgba(4,8,17,.63) !important;

    transition:
      border-color .18s ease,
      box-shadow .18s ease;
}

input:focus,
textarea:focus {
    border-color:
      rgba(134,150,255,.55) !important;

    box-shadow:
      0 0 0 3px
      rgba(120,137,255,.10);
}

/* ==========================================
   SHARED ROOM
   ========================================== */

.room-shell {
    max-width: 1080px;
    margin: auto;
}

.room-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 14px;
}

.room-title {
    margin: 0;
    font-size: 23px;
}

.room-subtitle {
    margin-top: 5px;

    color: var(--muted);
    font-size: 12px;
}

.room-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 7px 11px;

    border:
      1px solid rgba(93,224,155,.20);

    border-radius: 999px;

    color: #93edba;
    font-size: 12px;

    background:
      rgba(70,199,127,.08);
}

.room-live::before {
    content: "";

    width: 7px;
    height: 7px;

    border-radius: 999px;

    background: #5ee09b;

    box-shadow:
      0 0 12px rgba(94,224,155,.8);
}

.agent-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 13px;
}

.agent-chip {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 7px 11px;

    border:
      1px solid var(--line);

    border-radius: 999px;

    color: #dce3f6;
    font-size: 12px;

    background:
      rgba(255,255,255,.035);
}

.agent-dot {
    width: 8px;
    height: 8px;

    border-radius: 999px;
}

.agent-dot.ana {
    background: #62dca4;
}

.agent-dot.ani {
    background: #65b9ff;
}

.agent-dot.yola {
    background: #a28dff;
}

.agent-dot.ode {
    background: #ef9bcf;
}

.chat-panel {
    overflow: hidden;

    border:
      1px solid var(--line);

    border-radius: 22px;

    background:
      rgba(10,16,28,.67);

    box-shadow:
      0 24px 80px rgba(0,0,0,.25);
}

.chat-window {
    height: min(62vh, 680px);
    min-height: 440px;

    overflow-y: auto;

    padding:
      22px 18px 30px;

    scroll-behavior: smooth;
}

.chat-row {
    display: flex;
    gap: 10px;

    margin-bottom: 15px;

    align-items: flex-end;
}

.chat-row.pak-iwan {
    justify-content: flex-end;
}

.chat-avatar {
    flex: 0 0 34px;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    font-size: 11px;
    font-weight: 850;

    color: white;

    box-shadow:
      0 7px 20px rgba(0,0,0,.23);
}

.chat-row.ana .chat-avatar {
    background:
      linear-gradient(135deg,#45b77e,#27775a);
}

.chat-row.ani .chat-avatar {
    background:
      linear-gradient(135deg,#4b9ddf,#37549a);
}

.chat-row.yola .chat-avatar {
    background:
      linear-gradient(135deg,#8d79e8,#5844a5);
}

.chat-row.ode .chat-avatar {
    background:
      linear-gradient(135deg,#d46ead,#843f76);
}

.chat-row.other .chat-avatar {
    background:
      linear-gradient(135deg,#74809b,#495367);
}

.chat-row.pak-iwan .chat-avatar {
    order: 2;

    background:
      linear-gradient(135deg,#7d8cf2,#5068c7);
}

.chat-bubble {
    max-width: min(76%, 760px);

    padding: 12px 14px 10px;

    border:
      1px solid rgba(255,255,255,.065);

    border-radius:
      16px 16px 16px 5px;

    background:
      rgba(25,34,56,.88);

    box-shadow:
      0 8px 24px rgba(0,0,0,.12);
}

.chat-row.pak-iwan .chat-bubble {
    border-radius:
      16px 16px 5px 16px;

    border-color:
      rgba(130,145,255,.20);

    background:
      linear-gradient(
        135deg,
        rgba(82,99,189,.55),
        rgba(51,70,137,.50)
      );
}

.chat-row.ana .chat-bubble {
    border-left:
      3px solid rgba(94,224,155,.68);
}

.chat-row.ani .chat-bubble {
    border-left:
      3px solid rgba(101,185,255,.68);
}

.chat-row.yola .chat-bubble {
    border-left:
      3px solid rgba(162,141,255,.72);
}

.chat-row.ode .chat-bubble {
    border-left:
      3px solid rgba(239,155,207,.70);
}

.chat-speaker {
    margin-bottom: 5px;

    color: #cbd3ed;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .25px;
}

.chat-row.pak-iwan .chat-speaker {
    text-align: right;

    color: #dfe4ff;
}

.message-text {
    white-space: pre-wrap;
    word-break: break-word;

    color: #f1f4fb;

    font-size: 14px;
    line-height: 1.55;
}

.chat-time {
    margin-top: 7px;

    color: #71809e;

    font-size: 10px;
}

.chat-row.pak-iwan .chat-time {
    text-align: right;

    color: #aeb8db;
}

.composer {
    position: relative;

    padding: 15px;

    border-top:
      1px solid var(--line);

    background:
      rgba(11,17,30,.95);

    backdrop-filter: blur(18px);
}

.composer-box {
    display: flex;
    align-items: flex-end;
    gap: 10px;

    padding: 8px;

    border:
      1px solid rgba(255,255,255,.08);

    border-radius: 17px;

    background:
      rgba(3,7,14,.56);
}

.composer textarea {
    flex: 1;

    min-height: 54px;
    max-height: 180px;

    margin: 0 !important;
    padding: 11px 12px !important;

    resize: vertical;

    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;

    font-family: inherit;
    font-size: 14px;
}

.send-team-btn {
    flex: 0 0 auto;

    min-width: 118px;

    margin: 0 !important;
    padding: 12px 17px !important;
}

.team-status {
    min-height: 19px;

    margin-top: 8px;

    color: var(--muted);

    font-size: 11px;
}

/* login */
body > .card {
    max-width: 430px !important;
    margin: 12vh auto !important;

    border-radius: 22px !important;

    box-shadow:
      0 25px 90px rgba(0,0,0,.34) !important;
}

/* scrollbar */
::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,.12);
}

::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: rgba(142,153,190,.26);
}

@media (max-width: 720px) {
    header {
        padding:
          16px 14px 14px !important;
    }

    main {
        padding:
          17px 12px !important;
    }

    nav {
        gap: 6px !important;
    }

    nav a {
        padding:
          7px 10px !important;

        font-size:
          12px !important;
    }

    .room-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-window {
        min-height: 55vh;
        height: 58vh;

        padding:
          16px 10px 24px;
    }

    .chat-avatar {
        flex-basis: 30px;
        width: 30px;
        height: 30px;

        border-radius: 10px;
    }

    .chat-bubble {
        max-width: 83%;

        padding:
          11px 12px 9px;
    }

    .message-text {
        font-size: 13px;
    }

    .composer {
        padding: 10px;
    }

    .composer-box {
        align-items: stretch;
        flex-direction: column;
    }

    .send-team-btn {
        width: 100%;
    }
}


/* Composer Shared Room - posisi atas */
.composer-top {
    border-top: 0 !important;
    border-bottom:
      1px solid var(--line) !important;
}

.composer-grid {
    display: grid !important;
    grid-template-columns:
      minmax(0, 1fr) auto !important;

    align-items: end !important;
    gap: 10px !important;
}

.composer-grid textarea {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;

    min-height: 82px !important;
    max-height: 170px !important;

    resize: vertical !important;
}

.composer-grid .send-team-btn {
    display: inline-block !important;

    width: auto !important;
    min-width: 100px !important;
    max-width: 130px !important;

    height: 46px !important;

    padding:
      0 20px !important;

    margin: 0 !important;

    align-self: end !important;

    white-space: nowrap !important;
}

@media (max-width: 600px) {
    .composer-grid {
        grid-template-columns:
          1fr !important;
    }

    .composer-grid .send-team-btn {
        width: 100% !important;
        max-width: none !important;
    }
}
