auth

Main authentication module for my projects
git clone git://git.finwo.net/app/auth
Log | Files | Refs

base.css (9731B)


      1 :root {
      2   font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
      3   --canvas: #f3f3f3;
      4   --page: #fff;
      5   --surface: #fff;
      6   --sidebar: #000;
      7   --sidebar-active: #333;
      8   --topbar: #000;
      9   --text: #1b1b1b;
     10   --muted: #656a70;
     11   --accent: #25a;
     12   --accent-hover: #2a66cc;
     13   --accent-active: #1b468c;
     14   --accent-text: #25a;
     15   --accent-text-hover: #2a66cc;
     16   --accent-text-active: #1b468c;
     17   --on-accent: #fff;
     18   --menu-hover: #8884;
     19   --row: #00000008;
     20   --row-hover: #0000000d;
     21   --skeleton: #00000012;
     22   --danger: #c9190b;
     23   --danger-text: #c9190b;
     24   --field-line: rgba(0, 0, 0, 0.42);
     25   --shadow: 0 0.125em 0.25em #0008;
     26   --hex: url('template://asset/hex-grid-light.svg');
     27 }
     28 
     29 *,
     30 *::before,
     31 *::after {
     32   box-sizing: border-box;
     33 }
     34 
     35 html {
     36   -webkit-text-size-adjust: 100%;
     37   text-size-adjust: 100%;
     38 }
     39 
     40 html,
     41 body {
     42   margin: 0;
     43   padding: 0;
     44 }
     45 
     46 body {
     47   background: var(--canvas);
     48   color: var(--text);
     49   -webkit-font-smoothing: antialiased;
     50 }
     51 
     52 [hidden] {
     53   display: none !important;
     54 }
     55 
     56 .topbar {
     57   position: sticky;
     58   top: 0;
     59   z-index: 20;
     60   display: flex;
     61   align-items: center;
     62   justify-content: space-between;
     63   gap: 1rem;
     64   min-height: 3.5rem;
     65   padding: env(safe-area-inset-top) max(1.5rem, env(safe-area-inset-right)) 0
     66            max(1.5rem, env(safe-area-inset-left));
     67   background: var(--topbar);
     68   color: rgba(255, 255, 255, 0.76);
     69   font-size: 0.875rem;
     70 }
     71 
     72 .brand {
     73   display: flex;
     74   align-items: center;
     75   gap: 0.75rem;
     76   color: #fff;
     77   text-decoration: none;
     78 }
     79 
     80 .brand-icon {
     81   flex: none;
     82   width: 1.125rem;
     83   height: 1.125rem;
     84 }
     85 
     86 .brand-name {
     87   font-size: 1.125rem;
     88   font-weight: 500;
     89   line-height: 1.3;
     90 }
     91 
     92 .app {
     93   display: grid;
     94   grid-template-columns: minmax(0, 1fr);
     95   grid-template-rows: auto minmax(0, 1fr);
     96   min-height: calc(100vh - 3.5rem);
     97   min-height: calc(100svh - 3.5rem);
     98 }
     99 
    100 .sidebar {
    101   display: flex;
    102   flex-direction: column;
    103   min-height: auto;
    104   background: var(--sidebar);
    105   color: #fff;
    106 }
    107 
    108 .nav {
    109   display: flex;
    110   flex-direction: row;
    111   flex-wrap: nowrap;
    112   overflow-x: auto;
    113   padding: 0.75rem 0;
    114   scrollbar-width: none;
    115 }
    116 
    117 .nav::-webkit-scrollbar {
    118   display: none;
    119 }
    120 
    121 .nav-label {
    122   display: none;
    123   margin: 0;
    124   padding: 0.5rem 1.5rem;
    125   color: rgba(255, 255, 255, 0.46);
    126   font-size: 0.6875rem;
    127   font-weight: 600;
    128   letter-spacing: 0.08em;
    129   text-transform: uppercase;
    130 }
    131 
    132 .nav-item {
    133   display: flex;
    134   align-items: center;
    135   justify-content: center;
    136   gap: 0.75rem;
    137   min-width: 4rem;
    138   flex: 1 0 auto;
    139   padding: 0.6875rem 0.5rem;
    140   color: rgba(255, 255, 255, 0.82);
    141   font-size: 0.875rem;
    142   line-height: 1.4;
    143   text-align: center;
    144   text-decoration: none;
    145   cursor: pointer;
    146   touch-action: manipulation;
    147   user-select: none;
    148   -webkit-tap-highlight-color: transparent;
    149 }
    150 
    151 .nav-item span {
    152   position: absolute;
    153   width: 1pt;
    154   height: 1pt;
    155   padding: 0;
    156   margin: -1pt;
    157   overflow: hidden;
    158   clip-path: inset(50%);
    159   white-space: nowrap;
    160   border: 0;
    161 }
    162 
    163 .nav-item svg {
    164   flex: none;
    165   width: 1.125rem;
    166   height: 1.125rem;
    167 }
    168 
    169 .nav-item:hover,
    170 .nav-item:active {
    171   background: var(--menu-hover);
    172   color: #fff;
    173 }
    174 
    175 .nav-item.is-active {
    176   background: var(--sidebar-active);
    177   box-shadow: inset 0 0.25rem 0 var(--accent);
    178   color: #fff;
    179 }
    180 
    181 .main {
    182   display: flex;
    183   flex-direction: column;
    184   min-width: 0;
    185 }
    186 
    187 .content {
    188   width: 100%;
    189   max-width: 72rem;
    190   margin: 0 auto;
    191   padding: 1.75rem clamp(1rem, 4vw, 2rem) calc(3rem + env(safe-area-inset-bottom));
    192 }
    193 
    194 .page-header {
    195   margin-bottom: 1.5rem;
    196 }
    197 
    198 .page-header h1 {
    199   margin: 0;
    200   font-size: 1.5rem;
    201   font-weight: 400;
    202   line-height: 1.3;
    203 }
    204 
    205 .page-header p {
    206   margin: 0.25rem 0 0;
    207   color: var(--muted);
    208   font-size: 0.875rem;
    209   line-height: 1.5;
    210 }
    211 
    212 .grid {
    213   display: grid;
    214   grid-template-columns: minmax(0, 1fr);
    215   gap: 1rem;
    216 }
    217 
    218 .panel {
    219   min-width: 0;
    220   max-width: 100%;
    221   padding: 1.5rem;
    222   background: var(--surface);
    223   box-shadow: var(--shadow);
    224 }
    225 
    226 .panel-wide {
    227   grid-column: 1 / -1;
    228   margin-top: 1rem;
    229 }
    230 
    231 .panel h2 {
    232   margin: 0 0 1.25rem;
    233   font-size: 1.0625rem;
    234   font-weight: 500;
    235   line-height: 1.4;
    236 }
    237 
    238 .details {
    239   display: grid;
    240   gap: 0.875rem;
    241   margin: 0;
    242 }
    243 
    244 .details > div {
    245   display: grid;
    246   grid-template-columns: minmax(0, 1fr);
    247   gap: 1rem;
    248 }
    249 
    250 .details dt {
    251   color: var(--muted);
    252   font-size: 0.875rem;
    253   line-height: 1.5;
    254 }
    255 
    256 .details dd {
    257   margin: 0;
    258   overflow-wrap: anywhere;
    259   font-size: 0.875rem;
    260   line-height: 1.5;
    261 }
    262 
    263 .note {
    264   margin: 0;
    265   color: var(--muted);
    266   font-size: 0.875rem;
    267   line-height: 1.6;
    268 }
    269 
    270 .button {
    271   display: inline-block;
    272   padding: 0.625rem 1.25rem;
    273   border: 0;
    274   border-radius: 0;
    275   background: var(--accent);
    276   color: var(--on-accent);
    277   font: inherit;
    278   font-size: 0.8125rem;
    279   font-weight: 500;
    280   letter-spacing: 0.05em;
    281   line-height: 1.4;
    282   text-decoration: none;
    283   text-transform: uppercase;
    284   cursor: pointer;
    285 }
    286 
    287 .button:hover {
    288   background: var(--accent-hover);
    289 }
    290 
    291 .button:active {
    292   background: var(--accent-active);
    293 }
    294 
    295 .user-menu {
    296   position: relative;
    297 }
    298 
    299 .user-menu summary {
    300   display: grid;
    301   place-items: center;
    302   width: 2.25rem;
    303   height: 2.25rem;
    304   color: rgba(255, 255, 255, 0.86);
    305   list-style: none;
    306   cursor: pointer;
    307   user-select: none;
    308 }
    309 
    310 .user-menu summary::-webkit-details-marker {
    311   display: none;
    312 }
    313 
    314 .user-menu summary::marker {
    315   content: '';
    316 }
    317 
    318 .user-menu summary:hover,
    319 .user-menu[open] summary {
    320   color: #fff;
    321 }
    322 
    323 .user-menu svg {
    324   width: 1.5rem;
    325   height: 1.5rem;
    326 }
    327 
    328 .user-panel {
    329   position: absolute;
    330   top: 2.75rem;
    331   right: 0;
    332   z-index: 10;
    333   width: min(15rem, calc(100vw - 2rem));
    334   max-width: calc(100vw - 2rem);
    335   background: var(--sidebar);
    336   color: #fff;
    337   box-shadow: var(--shadow);
    338 }
    339 
    340 .user-summary {
    341   display: grid;
    342   gap: 0.125rem;
    343   padding: 0.875rem 1rem;
    344 }
    345 
    346 .user-name {
    347   font-size: 0.875rem;
    348   font-weight: 500;
    349   line-height: 1.4;
    350 }
    351 
    352 .user-meta {
    353   color: rgba(255, 255, 255, 0.56);
    354   font-size: 0.75rem;
    355   line-height: 1.4;
    356 }
    357 
    358 .user-menu-list {
    359   display: flex;
    360   flex-direction: column;
    361   padding: 0.5rem 0;
    362 }
    363 
    364 .user-menu-item {
    365   display: flex;
    366   align-items: center;
    367   gap: 0.75rem;
    368   width: 100%;
    369   padding: 0.625rem 1rem;
    370   border: 0;
    371   background: transparent;
    372   color: rgba(255, 255, 255, 0.82);
    373   font: inherit;
    374   font-size: 0.875rem;
    375   line-height: 1.4;
    376   text-align: left;
    377   text-decoration: none;
    378   cursor: pointer;
    379   user-select: none;
    380 }
    381 
    382 .user-menu-value {
    383   margin-left: auto;
    384   color: rgba(255, 255, 255, 0.56);
    385   font-size: 0.75rem;
    386 }
    387 
    388 .user-menu-item svg {
    389   flex: none;
    390   width: 1.125rem;
    391   height: 1.125rem;
    392 }
    393 
    394 .user-menu-item:hover {
    395   background: var(--menu-hover);
    396   color: #fff;
    397 }
    398 
    399 .mockup-controls {
    400   position: fixed;
    401   right: 1rem;
    402   bottom: 1rem;
    403   z-index: 100;
    404   display: flex;
    405   flex-wrap: wrap;
    406   align-items: center;
    407   gap: 0.25rem;
    408   max-width: calc(100vw - 2rem);
    409   padding: 0.375rem;
    410   background: #000;
    411   color: #fff;
    412   box-shadow: var(--shadow);
    413   font-size: 0.75rem;
    414 }
    415 
    416 .mockup-label {
    417   padding: 0 0.5rem;
    418   color: rgba(255, 255, 255, 0.5);
    419   font-size: 0.6875rem;
    420   font-weight: 600;
    421   letter-spacing: 0.08em;
    422   text-transform: uppercase;
    423 }
    424 
    425 .mockup-button {
    426   padding: 0.375rem 0.625rem;
    427   border: 0;
    428   background: transparent;
    429   color: rgba(255, 255, 255, 0.76);
    430   font: inherit;
    431   font-size: 0.75rem;
    432   cursor: pointer;
    433 }
    434 
    435 .mockup-button:hover {
    436   background: var(--menu-hover);
    437   color: #fff;
    438 }
    439 
    440 .mockup-button.is-active {
    441   background: var(--sidebar-active);
    442   color: #fff;
    443 }
    444 
    445 .mockup-separator {
    446   width: 0.0625rem;
    447   height: 1.25rem;
    448   margin: 0 0.25rem;
    449   background: rgba(255, 255, 255, 0.18);
    450 }
    451 
    452 a:focus-visible,
    453 button:focus-visible,
    454 summary:focus-visible {
    455   outline: 2pt solid var(--accent);
    456   outline-offset: 2pt;
    457 }
    458 
    459 @media (min-width: 40em) {
    460   .nav-item {
    461     padding-inline: 1rem;
    462   }
    463 
    464   .nav-item span {
    465     position: static;
    466     width: auto;
    467     height: auto;
    468     margin: 0;
    469     overflow: visible;
    470     clip-path: none;
    471     display: inline;
    472     white-space: normal;
    473   }
    474 
    475   .details > div {
    476     grid-template-columns: 8.5rem minmax(0, 1fr);
    477   }
    478 }
    479 
    480 @media (min-width: 60em) {
    481   .app {
    482     grid-template-columns: 15rem minmax(0, 1fr);
    483     grid-template-rows: minmax(0, 1fr);
    484   }
    485 
    486   .sidebar {
    487     min-height: calc(100vh - 3.5rem);
    488     min-height: calc(100svh - 3.5rem);
    489   }
    490 
    491   .nav {
    492     flex: 1;
    493     overflow: visible;
    494     flex-direction: column;
    495     flex-wrap: nowrap;
    496   }
    497 
    498   .nav-label {
    499     display: block;
    500   }
    501 
    502   .nav-item {
    503     min-width: 0;
    504     width: 100%;
    505     flex: none;
    506     padding-inline: 1.5rem;
    507     justify-content: flex-start;
    508     text-align: left;
    509   }
    510 
    511   .grid {
    512     grid-template-columns: repeat(2, minmax(0, 1fr));
    513   }
    514 }
    515 
    516 @media (prefers-color-scheme: dark) {
    517   :root:not([data-theme]) {
    518     --canvas: #181818;
    519     --page: #000;
    520     --surface: #282828;
    521     --sidebar: #000;
    522     --sidebar-active: #333;
    523     --topbar: #000;
    524     --text: #e7e7e7;
    525     --muted: #a0a4a8;
    526     --accent-text: #4d8dff;
    527     --accent-text-hover: #6ea8ff;
    528     --accent-text-active: #3b7cff;
    529     --row: #ffffff0d;
    530     --row-hover: #ffffff14;
    531     --skeleton: #ffffff14;
    532     --danger: #f28b82;
    533     --danger-text: #f28b82;
    534     --field-line: rgba(255, 255, 255, 0.42);
    535     --hex: url('template://asset/hex-grid-dark.svg');
    536     color-scheme: dark;
    537   }
    538 }
    539 
    540 :root[data-theme="dark"] {
    541   --canvas: #181818;
    542   --page: #000;
    543   --surface: #282828;
    544   --sidebar: #000;
    545   --sidebar-active: #333;
    546   --topbar: #000;
    547   --text: #e7e7e7;
    548   --muted: #a0a4a8;
    549   --accent-text: #4d8dff;
    550   --accent-text-hover: #6ea8ff;
    551   --accent-text-active: #3b7cff;
    552   --row: #ffffff0d;
    553   --row-hover: #ffffff14;
    554   --skeleton: #ffffff14;
    555   --danger: #f28b82;
    556   --danger-text: #f28b82;
    557   --field-line: rgba(255, 255, 255, 0.42);
    558   --hex: url('template://asset/hex-grid-dark.svg');
    559   color-scheme: dark;
    560 }