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

/* BODY */
body {
    font-family: 'Inter', Arial, sans-serif;
    background: linear-gradient(135deg,#eef2ff,#f5f7fa);
    display:flex;
    flex-direction:column;
    min-height:100vh;
}

.result-box p {
  margin: 6px 0;
}

/* CONTAINER */
.container {
    max-width: 720px;
    width: 92%;
    margin: auto;
    padding: 20px 0;
    flex:1;
    text-align:center;
}

/* LOGO */
.logo img{
    height:48px;
    margin-bottom:10px;
}

/* INPUT */
input{
    padding:14px 16px;
    width:100%;
    border-radius:14px;
    border:1px solid #e0e0e0;
    font-size:15px;
    background:#fff;

    box-shadow:0 2px 8px rgba(0,0,0,0.04);
    transition:all 0.25s ease;
}

/* HOVER */
input:hover{
    border-color:#005AFF;
    box-shadow:0 3px 10px rgba(0,90,255,0.1);
}

/* FOCUS */
input:focus{
    outline:none;
    border-color:#005AFF;
    box-shadow:0 0 0 3px rgba(0,90,255,0.15);
}

/* BUTTON MAIN */
button {
    margin-top: 18px;
    padding: 14px;
    width:100%;
    background: linear-gradient(90deg,#005AFF,#00C3FF);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
}

button:hover{
    transform: translateY(-2px);
    box-shadow:0 10px 25px rgba(0,90,255,0.25);
}

/* CARD */
.card{
    margin-top:20px;
    padding:20px;
    border-radius:20px;
    text-align:left;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(18px);
    box-shadow:0 18px 40px rgba(0,0,0,0.1);
}

/* RESULT */
.result-box{
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:16px;
}

h2{
    margin-bottom:8px;
}

/* BOX */
.box{
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(14px);
    padding:18px;
    border-radius:18px;
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
    transition:0.25s;
}

/* SECTION TITLE */
.section-title{
    font-size:16px;
    font-weight:700;
    margin-bottom:12px;
}

/* DETAIL ROW */
.detail-row{
    display:flex;
    align-items:center;
    gap:2px;
    margin-bottom:10px;
    font-size:14px;
}

.detail-row i{
    width:20px;
    color:#005AFF;
    font-size:16px;
}

.box:hover{
    transform: translateY(-3px);
}

/* FLEX */
.flex{
    display:flex;
    gap:14px;
    align-items:flex-start;
    flex-wrap:wrap;
}

/* IMAGE */
.thumb{
    width:90px;
    height:90px;
    object-fit:cover;
    border-radius:14px;
    flex-shrink:0;
}

/* GRID */
.grid2{
    display:grid;
    grid-template-columns: repeat(2,1fr);
    gap:12px;
}

.grid3{
    display:grid;
    grid-template-columns: repeat(3,1fr);
    gap:12px;
}

/* DIVIDER LINE (BOX 2 FIX) */
.grid2 .stat:not(:last-child){
    border-right:1.5px solid rgba(0,0,0,0.08);
}

/* DIVIDER LINE (BOX 3 FIX) */
.grid3 .stat:not(:last-child){
    border-right:1.5px solid rgba(0,0,0,0.08);
}

/* STAT */
.stat{
    background: rgba(255,255,255,0.6);
    padding:14px;
    border-radius:14px;
    text-align:center;
}

/* LABEL */
.label{
    font-size:15px;
    color:#666;
    margin-bottom:8px;
    font-weight:700;
}

/* VALUE */
.stat h2{
    font-size:22px;
    font-weight:700;
    color:#005AFF;
}

/* BIG */
.grid2 .stat h2{
    font-size:26px;
    color:#000;
}

/* =======================
   PROGRESS BAR
======================= */
.progress{
  height:8px;
  background: rgba(0,0,0,0.06);
  border-radius:50px;
  overflow:hidden;
  margin-bottom:12px;
  position:relative;
}

/* BAR */
.bar{
  height:100%;
  display:block;

  /* ðŸ”¥ FORCE width visible */
  width:100%;

  border-radius:50px;

  background: linear-gradient(90deg,#005AFF,#00C3FF);

  transition: width 1.2s ease;

  min-width:2px;
}

/* =======================
   COLORS (SAFE)
======================= */
.bar[style*="width:100"]{
  background: linear-gradient(90deg,#ff3b3b,#ff8a8a);
}

.bar[style*="width:8"],
.bar[style*="width:9"]{
  background: linear-gradient(90deg,#ff9800,#ffcc80);
}

/* =======================
   BUDGET TEXT
======================= */
.budget{
  display:flex;
  justify-content:space-between;
  font-weight:600;
  font-size:14px;
}

/* DATE RANGE SELECT FIX */
.date-filter select{
    margin-top:8px;

    /* FIXED AUTO PADDING */
    padding:0.6em 2.2em 0.6em 0.9em;

    border-radius:10px;
    border:1px solid #e0e0e0;
    font-size:14px;
    background:#fff;
    color:#333;

    box-shadow:0 2px 8px rgba(0,0,0,0.05);
    cursor:pointer;
    transition:all 0.25s ease;

    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;

    background-image:url("data:image/svg+xml;utf8,<svg fill='%23005AFF' height='18' viewBox='0 0 20 20' width='18' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    
    background-repeat:no-repeat;

    /* AUTO POSITION */
    background-position:right 0.7em center;

    /* AUTO SIZE */
    background-size:1em;
}

/* HOVER */
.date-filter select:hover{
    border-color:#005AFF;
    box-shadow:0 4px 12px rgba(0,90,255,0.12);
}

/* FOCUS */
.date-filter select:focus{
    outline:none;
    border-color:#005AFF;
    box-shadow:0 0 0 3px rgba(0,90,255,0.15);
}

/* REMOVE OLD ARROW */
select::-ms-expand{
    display:none;
}

/* SELECT */
select{
    padding:6px 10px;
    border-radius:8px;
    border:none;
    font-size:13px;
    background: rgba(255,255,255,0.85);
    box-shadow:0 4px 10px rgba(0,0,0,0.05);
    cursor:pointer;
}

/* TEXT */
h3{
    margin-bottom:6px;
    font-size:17px;
    font-weight:700;
}

p{
    font-size:16px;
    font-weight:520;
    color:#444;
}

/* DATE BOX */
.date-box p{
    margin-bottom:10px;
    line-height:1.6;
}

.date-box strong{
    display:inline-block;
}

/* ERROR BOX */
.error-box{
    background: rgba(255,0,0,0.08);
    backdrop-filter: blur(10px);
    color:#c40000;
    padding:12px;
    border-radius:10px;
    text-align:center;
    margin-top:15px;
    margin-bottom:15px;
    font-weight:600;
}

/* TOAST */
.toast{
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #111;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 0;
    transition: 0.3s;
    z-index: 9999;
}

.toast.show{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ACTION BUTTONS FIX */
.action-row{
    display:flex;
    gap:8px;
    margin-top:12px;
}

.action-row button{
    flex:1;
    margin-top:10px;
    padding:12px 8px;
    border-radius:10px;
    font-size:15px;

    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}

/* FOOTER */
.footer{
text-align:center;
padding:20px;
font-size:14px;
color:#666;
background: rgba(255,255,255,0.6);
backdrop-filter: blur(10px);
border-top:1px solid rgba(255,255,255,0.5);
box-shadow: 0 -8px 25px rgba(0,0,0,0.08);
}

.footer a{
color:#005AFF;
font-weight:600;
text-decoration:none;
}

.footer a:hover{
color:#00C3FF;
}

/* MOBILE */
@media(max-width:480px){

    /* layout */
    .flex{
        flex-direction:row;
        align-items:flex-start;
        gap:10px;
    }

    /* thumbnail */
    .thumb{
        width:70px;
        height:70px;
        border-radius:12px;
    }
    
    .thumb{
    object-fit:cover;
    image-rendering: auto;
}

    /* content */
    .flex > div{
        flex:1;
    }

    /* TITLE SMALL */
    .flex h3{
        font-size:15px;
        font-weight:700;
        line-height:1.3;
        margin-bottom:4px;
    }

    /* text */
    .flex p{
        font-size:13px;
        font-weight:520;
        margin-bottom:2px;
    }

    /* DATE RANGE INLINE */
.date-filter{
    display:flex;
    align-items:center;
    justify-content:flex-start; /* ðŸ”¥ FIX */
    margin-top:6px;
    gap:4px;
}

    .date-filter span{
        font-size:14px;
        font-weight:500;
        
    }

    .date-filter select{
        font-size:14px;
        padding:5px 8px;
        border-radius:8px;
        max-width:120px;
    }
    
    .date-filter span{
    white-space:nowrap; 
}

.date-filter{
    flex-wrap:nowrap;
}

    /* GRID */
    .grid3{
        grid-template-columns:1fr 1fr 1fr;
        gap:8px;
    }

    .grid2{
        grid-template-columns:1fr 1fr;
        gap:8px;
    }

    /* stats */
    .stat{
        padding:10px;
    }

    .stat h2{
        font-size:18px;
        margin-bottom:0;
    }

    .grid2 .stat h2{
        font-size:22px;
    }

}

/* TABLET */
@media(max-width:768px){
    .grid3{
        grid-template-columns:1fr 1fr;
    }
}

/* =======================
   CAMPAIGN DETAILS 2 COLUMN
======================= */

.date-box{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px 30px;
}

/* title full width */
.date-box .section-title{
    grid-column:1 / -1;
}

/* MOBILE → back to 1 column */
@media(max-width:480px){
    .date-box{
        grid-template-columns:1fr;
    }
}