.qnam{
    padding: 2px;
    background-color: #dedede;
    border-radius: 4px;
    font-style: italic;
    font-size: 0.85em;
}
/*Basic Styling*/
body {
    font-family: Arial;
    background: linear-gradient(to right, #f9fdfd, #eafaf9);
  color: #222;
  padding-top: 50px;
}
.fullsmenu {
    width: 90%;
    min-height: 90%;
    text-align: center;
    margin-left: 5%;
/*     margin-top: 5%; */
    border-radius: 5px;
    background-color: #d6f5f3;
    padding: 10px;
}
.vertical-menu {
    background-color: #b8e0de;
    border-radius: 15px;
    padding: 5px;
}
.vertical-menu a {
  background-color: #c2d6d5;
  color: black;
  display: block;
  padding: 12px; /* Add some padding */
  text-decoration: none;
  font-family: Arial;
  text-align: center;
  font-size: 1.5em;
  border-radius: 5px;
}
.vertical-menu a:hover {
  background-color: #eafaf9;
}
.botbar {
	z-index: 10000;
	position:fixed;
	left: 3px;
	bottom: 3px;
	padding: 3px;
	border-radius:5px;
	border: 2px solid black;
	background-color: #b8e0de;
}
div.when {
    width: 100%;
    text-align: center !important;
    font-size: 1.2em;
    position: relative;
}
div.fans {
    max-width: 400px;
    padding:15px;
    margin: 5px;
    border-radius: 20px;
    background-color: #dfdfdf;
    font-size: 0.8em;
    display: inline-block;
    vertical-align: middle;
    white-space: normal;
    border: 2px solid black;
}
table.cards {
    left: 0px;
    top: 0px;
    right: 0px;
    width: 100%;
    table-layout: fixed;
}
.statuscol {
  width: 50px;
}
.primarycol {
  width: 150px;
}
.ratecol {
  width: 125px;
}
.linkboxcol {
  min-width: 80px;
  max-width: 120px;
  width: 10%;
  padding: 5px;
}

table.cards > tbody > tr {
    height: 100px;
    font-family: Arial;
}
table.cards > tbody > tr > td, .sinfo td {
    background-color: #b8e0de;
    border-radius: 10px;
    padding:5px;
    -webkit-transition: border-radius 0.5s; /* Safari */
    transition: border-radius 0.5s;
}
table.cards > tbody > tr > td.status {
    background-color: #ffbbbb;
    text-align: center;
    font-size: 2em;
}
table.cards > tbody > tr > td.primary {
    text-align: center;
    font-size: 1.1em;
    background-color: #c2d6d5 !important;
    border-radius: 10px;
    -webkit-transition: background-color 0.5s, border-radius 0.5s; /* Safari */
    transition: background-color 0.5s, border-radius 0.5s;
}
tr.dark > td {
	background-color: #bbbbbb;
}
.scale {
  width: 110px;
  height: 24px;
  border-radius: 12px;
  background-image: 
    linear-gradient(to right, #ffbbbb, #bbffbb), /* Base gradient */
    repeating-linear-gradient(
      to right,
      transparent,
      transparent 9px,
      rgba(255,255,255,0.5) 9px,
      rgba(0,0,0,0.5) 10px
    );
  background-blend-mode: saturation;
  display: inline-block;
  cursor: pointer;
  box-shadow: inset 0 0 3px rgba(0,0,0,0.4);
  position: relative;
}
.scale:hover {
  box-shadow: inset 0 0 15px rgba(255,255,255,0.6), 0 0 8px rgba(100,100,100,0.4);
}
/* A small wrapper exactly the same size as your .scale */
.scale-container {
  position: relative;
  width: 110px;   /* same as .scale */
  height: 24px;   /* same as .scale */
  display: inline-block;
}

/* Place these labels at the very bottom of the container */
.scale-container .scale-labels {
  position: absolute;
  bottom: -12px;    /* just above the inner shadow */
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.6em;
  color: rgba(255,255,255,0.5);
  pointer-events: none; /* let clicks “pass through” to the slider */
}

/* Make sure your existing .scale still fills the container */
.scale-container .scale {
  width: 100%;
  height: 100%;
}
table.cards > tbody > tr > td.rate {
    background-color: #444444;
    color: white;
    text-align: center;
}
table.cards > tbody > tr > td.cprimary{
    cursor: pointer;
}
table.cards >tbody > tr > td.cprimary:hover {
    background-color: hsl(<?php echo rand(0,360); ?>, 100%, 87%) !important;
    
}

.prate {
  border-radius: 5px;
  background-color: violet;
  padding: 2px;
  margin-bottom: 2px;
  font-weight: bold;

  animation: pulse 2s infinite ease-in-out;
}
@keyframes pulse {
  0%   { opacity: 1; }
  50%  { opacity: 0.7; }
  100% { opacity: 1; }
}
table.cards > tbody > tr > td:hover, .sinfo td:hover{
    border-radius: 30px;
}
.placeholder {
  background-color: #ffecec !important; /* pale red */
  color:          #990000 !important;   /* dark red text */
  padding:    0.2em 0.5em;
  border-radius: 0.25em;
  font-style: italic;
  height: 100%;
  margin-left: 2px;
}
.user-menu {
	position: absolute;
	top: 45px;       /* just below the icon */
	left: 0;
	border-color: #ccc;
	border-width 2px;
	border-style: none solid solid solid;
	border-radius: 4px;
	padding: 8px;
	min-width: 250px;
	box-shadow: 0px 8px 5px 5px rgba(0,0,0,0.2);
	display: none;
	cursor: default;
	z-index: 9
}

/* Base button style */
.hdtb {
    width: 100%;
    padding: 6px;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: filter 0.2s ease;
}

.rate > button {
	padding: 6px;
	color: #444444;
	border: none;
	border-radius: 3px;
	cursor: pointer;
	margin-bottom: 10px;
	transition: filter 0.2s ease;
	max-width: 200px;
	background-color: #d6f5f3;
	margin: 5px auto;
	display: block;
}

.rate > button:hover {
	filter: brightness(85%);
}

/* Shared hover effect for all hdtb buttons */
.hdtb:hover {
    filter: brightness(85%);
}

/* Specific button types with distinct colours */
.setbut {
    background-color: #4336f4;  /* Blue-violet */
}

.lobut {
    background-color: #f44336;  /* Red */
}

.hebut {
    background-color: #34d426;  /* Green */
}

.upbut {
    background-color: #c026f4;  /* Purple-pink */
}
.adbut {
	background-color: #b8860b; /* Gold */
}

.purchbut {
    background-color: #f4b626;  /* Gold-yellow */
}

.verbut {
    background-color: #3a9ee0;  /* Blue-cyan */
    border: 1px solid #307cb4;
}
.vertical-menu div.lbu {
  background-color: #dddddd;
  color: black;
  display: block;
  padding: 12px; /* Add some padding */
  text-decoration: none;
  font-family: Arial;
  text-align: center;
  font-size: 1.5em;
  border-radius: 5px;
    cursor: pointer;
}

.vertical-menu div.lbu:hover {
  background-color: #ccc; /* Dark grey background on mouse-over */
}

warr::after{
    content: " →";
}
input, select {
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  height: 30px;
  padding: 3px;
  width: 100%;
}
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 15px;
  border-radius: 5px;   
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%; 
  background: #bbbbff;
  border: 2px solid black;
  cursor: ew-resize;
}

input[type=range]::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid black;
  background: #bbbbff;
  cursor: ew-resize;
}
input[type=submit], input[type=button] {
	width: 100%;
	background-color: hsl(177, 15%, 50%);
	margin: 8px 0;
	border: none;
	color: white;
	border-radius: 4px;
	cursor: pointer;
	-webkit-transition: background-color 0.5s, border-radius 0.5s;
	margin-left: 0.5s /* Safari */
	transition: background-color 0.5s, border-radius 0.5s;
	margin-left: 0.5s;
	font-size: 1.3em;
	text-align: center;
}
input[type=button]:hover{
    filter: hue-rotate(270deg);
}
input[type=submit]:hover {
  filter: hue-rotate(270deg);
}
.listenclosure {
	display: inline-flex;
	left: 0px;
	bottom: 0px;
	width: 100%;
}
.listtitle {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 55px;
    line-height: 55px;
    text-align: center;
    font-family: Arial;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 8;
    border-bottom: 3px solid black;
    overflow: hidden;
}

.listtitle .titlecontent {
    display: inline-block;
    max-width: calc(100% - 240px); /* 120px padding on each side */
    white-space: nowrap;
    overflow-x: auto;
    text-overflow: ellipsis;
    vertical-align: middle;
    padding: 0 10px;
    font-size: 25px;
}
.box{
/*     position: fixed; */
    height: 30px;
    padding: 5px;
    background-color: #c2d6d5;
    opacity: 0.8;
    border: 2px solid black;
    border-radius: 10px;
    font-family: Arial;
    font-size: 20px;
    line-height: 30px;
    vertical-align: middle;
    cursor: pointer;
    z-index: 10;
    -webkit-transition: background-color 0.5s, border-radius 0.5s; /* Safari */
    transition: background-color 0.5s, border-radius 0.5s;
}
.timer{
	display: inline-block;
}
#timerdisplay:hover {
	text-decoration: line-through;
	color: red;
}
.filbut {
    right: 5px;
    top: 5px;
    position: fixed;
}
.fillbut {
    margin: 5px;
    height: 30px;
    padding: 5px;
    background-color: #c2d6d5;
    opacity: 0.8;
    border: 2px solid black;
    border-radius: 10px;
    font-family: Arial;
    font-size: 20px;
    line-height: 30px;
    vertical-align: middle;
    cursor: pointer;
    z-index: 10;
    -webkit-transition: background-color 0.5s, border-radius 0.5s; /* Safari */
    transition: background-color 0.5s, border-radius 0.5s;
    display: inline-block;
}
.fillbut:hover {
    background-color: #ffcccc;
    border-radius: 15px;
    opacity: 1;
}
.delbut {
background-color: #ff4444 !important;
width: auto !important;
padding-left: 20px;
padding-right: 20px;
}

.delbut:hover {
background-color: #cc0000 !important;
color: white !important;
}

.menubut{
    left:5px;
    top:5px;
    z-index: 10;
}
.tagbut:hover {
	background-color: #ffcccc;
	border-radius: 15px;
    opacity: 1;
}
.tagbut{
    left:5px;
    bottom:5px;
    background-color: #ccccff;
}
.tagbox {
	background-color:#7777ee;
	padding:5px;
	border-radius:2px;
	margin:5px;
	display:inline-block;
}
.box:hover {
    background-color: #ffcccc;
    border-radius: 15px;
    opacity: 1;
}
.prodtable {
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

.prodtable td, .prodtable th {
  border: 1px solid #ddd;
  padding: 8px;
}

.prodtable tr:nth-child(even){background-color: #f2f2f2;}

.prodtable tr:hover {background-color: #ddd;}

.prodtable th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  color: white;
}

.prodtable th.type1 {
  background-color: #66ff66;
}

.prodtable th.type2 {
  background-color: #ff6666;
}

.prodtable th.type3 {
  background-color: #6666ff;
}
.prodtable th.type4 {
  background-color: #66ffff;
}

.tooltip {
    text-decoration: underline;
    color: #550000;
    font-weight: bold;
}
div.impaste {
    height: 100px;
    width: 100px;
    overflow-y: scroll;
    border: 1px solid black;
    display: inline-block;
    margin-right: 5px;
    padding: 5px;
}
div.impaste:focus {
    border: 3px solid red;
}
div.impaste:empty::before {
    content: attr(placeholder);
    color: #777; 
}

div.impaste:empty:focus::before {
    content: "";
}
.lastbut {
    margin: 5px;
    height: 30px;
    padding: 5px;
    background-color: #c2d6d5;
    opacity: 0.8;
    border: 2px solid black;
    border-radius: 10px;
    font-family: Arial;
    font-size: 20px;
    line-height: 30px;
    vertical-align: middle;
    cursor: pointer;
    z-index: 10;
    -webkit-transition: background-color 0.5s, border-radius 0.5s; /* Safari */
    transition: background-color 0.5s, border-radius 0.5s;
    display: inline-block;
}
.lastbut:hover {
    background-color: #ffcccc;
    border-radius: 15px;
    opacity: 1;
}
.blur {
   color: transparent;
   text-shadow: 0 0 8px rgba(0,0,0,0.8);
}
img.blur {
    -webkit-filter: blur(30px); /* Safari 6.0 - 9.0 */
    filter: blur(30px);
}
#topsearch {
    border-radius: 10px;
    line-height: 30px;
    height: auto;
    font-size: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 5px;
    border: 2px solid black;
    width: 150px !important;
}
.statball
{
    display: inline-block;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    margin: 2px;
    border-radius: 20px;
    border-width: 3px;
    border-style: outset;
    -webkit-transition: background-color 0.25s, border-radius 0.25s; width 0.25s; margin-left: 0.25s; border-width: 0.25s; border-style: 0.25s; /* Safari */
    transition: background-color 0.25s, border-radius 0.25s; width 0.25s; margin-left: 0.25s; border-width: 0.25s; border-style: 0.25s;
}
.statball:hover {
	border-radius: 5px;
	border-width: 5px;
	margin: 0px;
}
table.condition > tbody > tr > th {
    border-bottom: 4px solid gray;
}
table.condition > tbody > tr > td > div {
    position: relative;
    overflow-y: scroll;
    border: #999999 solid 3px;
    height: auto;
    overflow-y: scroll;
    background-color:#eeeeee;
    padding: 5px;
}
table.printt {
    width:100%;
}
table.printt td {
  border: 1px solid black;
    padding: 2px;
    background-color: #ffffff;
    -webkit-transition: background-color 0.5s, border-radius 0.5s; /* Safari */
    transition: background-color 0.5s, border-radius 0.5s;
}
table.printt td:hover {
    background-color:#eeeeee;
    border-radius: 5px;
}
table.printt th {
  word-wrap: break-word;
}
table.printt {
    /* 
table-layout: fixed;
    width: 100%;
 */
}
.prbut {
    border-top: 1px solid black;
    border-bottom: 1px solid black;
    background-color: #dedede;
    padding: 1px;
    line-height: 26px;
    vertical-align: middle;
}
.prbut > div {
    display: inline-block;
    margin:1px;
    background-color: #cdcdcd;
    border-radius: 5px;
    cursor: pointer;
    padding: 1px;
    height: 26px;
    width: 26px;
    vertical-align: middle;
    
}
.prbut > div:hover {
    background-color: #aaaaaa;
}
.fborder {
    border: 2px solid black !important;
}
.fbold {
    font-weight: bold;
}
.flg {
	border: 3px solid red !important;
    background-color: #ffbbbb !important;
    font-weight: bold;
}
.mem {
	border: 2.5px groove yellow !important;
    background-color: #ffffbb !important;
    font-family: Copperplate, Papyrus, fantasy;
}
.def {
	border: 2.5px dashed green !important;
    background-color: #bbffbb !important;
    font-family: "Times New Roman", Times, serif;
}
.frm {
	border: 2.5px solid blue !important;
    background-color: #bbbbff !important;
    font-family: "Courier New", "Lucida Console", monospace;
}
.hdn {
	border: 0.1px dashed gray !important;
    background-color: gray !important;
    font-weight: lighter;
    font-size: 0.2em;
    color: #b8e0de;
}
@media print
{    
    table.printt td:hover {
        background-color: #ffffff !important;
        border-radius:0px !important;
    }
    #controls, .noprint
    {
        display: none !important;
    }
    <?php
    if(isset($_GET["grey"]) && $_GET["grey"] == true)
    {
    ?>
    body {
        filter: Gray();
        filter: url('#grayscale');
        -webkit-filter: grayscale(100%); 
        filter: grayscale(100%);
    }
    <?php
    }
    ?>
}
table.printt h1, table.printt h2, table.printt h3, table.printt p, table.printt ul, table.printt ol, table.printt li, table.printt div:not(.prbut > div) {
    margin-block-start: 0em !important;
    margin-block-end: 0em !important;
}
table.printt ul, table.printt ol {
    padding-inline-start: 20px;
}
table.printt td.title {
  text-align: center;
}

table.printt td.content {
  font-size: 12px;
}
.pageselector > div, .presbutton, .newqbutton, .hidenq
{
    padding: 4px;
    border-radius: 10px;
    height: 30px;
    background-color: #b8e0de;
    cursor: pointer;
    margin-right: 5px;
    display: inline-block;
    line-height: 30px;
    vertical-align: middle;
    margin-top: 3px;
}
.pageselector > div:hover, .presbutton:hover, .newqbutton:hover, .hidenq:hover
{
    border-radius: 15px;
    background-color: #dddddd;
}
div#prescont {
    display: inline-block;
}
#editpage {
    display: none;
}
.addqual
{
    display:inline-block;
    margin-left: 4px;
    margin-right: 4px;
    width: 10px;
    max-width: 10px;
    overflow-x:hidden;
    white-space: nowrap;
    -webkit-transition: background-color 0.5s, border-radius 0.5s, max-width 0.5s; /* Safari */
    transition: background-color 0.5s, border-radius 0.5s, max-width 0.5s;
    border-radius: 3px;
    background-color: #bbbbbb;
    padding-left: 2px;
    padding-right:2px;
}
.addqual:hover
{
    width: auto;
    max-width: 150px;
}
.qual
{
    display:inline-block;
    margin-left: 4px;
    margin-right: 4px;
    border-radius: 3px;
    background-color: #bbbbbb;
    padding-left: 2px;
    padding-right:2px;
    border-left: 2px solid #888888;
    border-right: 2px solid #888888;
}
.qualpres
{
    display: inline-block;
    width: 30px;
    max-width: 30px;
    -webkit-transition: background-color 0.5s, border-radius 0.5s, max-width 0.5s; /* Safari */
    transition: background-color 0.5s, border-radius 0.5s, max-width 0.5s;
    padding-left: 2px;
    padding-right:2px;
    overflow-x:scroll;
    white-space: nowrap;
}
.qualpres:hover
{
    width: auto;
    max-width: 250px;
    background-color: #bbbbbb;
    border-radius: 3px;
}
.tbu
{
    text-decoration:underline;
    color:gray;
    cursor:pointer;
    padding:1px;
    border-radius:2px;
}
.tbu:hover
{
    background-color:#ccccff;
}
table.mtf > tr > td
{
	background-color: #ededed;

}
.mtfans.ansel {
	background-color: #7777ff;
}
.pus {
	display: inline-block;
}


    h1 {
        margin-top: 5px;
        margin-bottom: 8px;
    }
    #viewtable {
        border:none;
        width:100%;
        margin-left:auto;
        margin-right:auto;
        border-collapse: separate;
        border-spacing: 15px 5px;;
    }
    #viewtable td {
    }
    #viewtable table {
        margin-top:10px;
        margin-bottom: 10px;
        width: 50% !important;
    }
    #viewtable table td {
        border-radius: 15px;
    }
    #viewtable > tbody > tr > td:nth-child(1) {
        width: 20%;
    }
    #viewtable  > tbody > tr > td:nth-child(2) {
        width: 80%;
    }
    .sb {
        position: relative;
        background: #dddddd;
        border-radius: 10px;
        padding:20px;
        width:90%;
        -webkit-transition: border-radius 0.5s; /* Safari */
        transition: border-radius 0.5s;
    }
    .sbr:hover {
        border-top-left-radius:30px;
        border-bottom-left-radius:30px;
    }
    .sbl:hover {
        border-top-right-radius:30px;
        border-bottom-right-radius:30px;
    }
    .sb:after {
        content: '';
        position: absolute;
        top: 50%;
        width: 0;
        height: 0;
        border: 25px solid transparent;
        margin-top: -25px;
    }
    .sbl {
    
    }
    .sbr {
        text-transform: capitalize;
        font-weight: bold;
    }
    .sbl:after {
    
        left: 0;
        border-right-color: #dddddd;
        border-left: 0;
        margin-left: -23px;
    }
    .sbr:after {
        right: 0;
        border-left-color: #dddddd;
        border-right: 0;
        margin-right: -23px;
    }
    .cap {
        text-transform: capitalize;
    }
    /* Make the inner .ret table fill the full height of its td */
table.sinfo td > table.ret {
  height: 100%;
}

/* And make each cell inside it also fill top-to-bottom */
table.sinfo td > table.ret td {
  height: 100%;
  vertical-align: middle;
}
/* Remove the <hr> immediately following table.ret */
table.sinfo td > table.ret + hr {
  display: none;
}

.phonewarning {
	display: none;
	background-color: #ee4523;
	border: 3px solid #661000;
	border-radius: 20px;
	width: Calc(100% - 40px);
	height: auto;
	margin: 10px;
	margin-top: 25px;
	padding: 10px;
}

@media screen and (max-width: 615px) {
	.phonewarning {
		display: block;
	  }
}

@media screen and (max-width: 650px) {
  .card-container {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
  }

  div.fans {
    flex: 0 0 65%;
    min-width: 50%;
    max-width: none;
    margin: 0 2.5%;
    scroll-snap-align: left;
  }

  .card-container::-webkit-scrollbar {
    height: 6px;
  }

  .card-container::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 3px;
  }
  .status {
  	display: none !important;
  }
    .statuscol,
  .linkboxcol {
    display: none;
  }

  .primarycol {
    min-width: 100px;
    max-width: 120px;
  }

	.primary {
		min-width: 100px;
    	max-width: 120px;
	}

  .ratecol {
    width: 125px;
  }
}
#purchaseTableContainer {
    display: none;
    margin-top: 20px;
    width: 100%;
}

#purchaseTableContainer table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

#purchaseTableContainer th, #purchaseTableContainer td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
}

#purchaseTableContainer th {
    background-color: #eee;
    font-weight: bold;
}
.welcome-message {
    background-color: #f0fff0;
    border-left: 6px solid #70c070;
    padding: 15px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 0.95em;
}
.welcome-message.success {
    background-color: #f0fff0;
    border-left: 6px solid #70c070;
}
.welcome-message.failure {
    background-color: #fff0f0;
    border-left: 6px solid #c07070;
}
.welcome-message.upgrade {
    background-color: #ffd8ff;
    border-left: 6px solid #c070c0;
}
    footer {
      text-align: center;
      padding: 2em 1em;
      font-size: 0.9em;
      color: #888;
    }
.gapafter {
	margin-bottom: 10px;
}
.gapbefore {
	margin-top: 10px;
}
.tab-item {
  position: relative;
  display: inline-block; /* or flex, depending on your layout */
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -10px;
  background: #e00;
  color: #fff;
  font-size: 0.65em;
  line-height: 1;
  padding: 0.2em 0.5em;
  border-radius: 999px;
  pointer-events: none;
}

.tab-text {
  /* ensure the text itself remains nicely padded */
  padding-right: 1em;
}
.note-group-select-from-files {
  display: none;
}